Appbuilder DataAccess speed Versus OEA

Posted by kopfb on 29-Apr-2010 13:40

I have noticed that the time to run a query in OEA (10.2B) using GUI for .NET whether it be a simple single table query or joined query takes 5 to 6 times longer to bring back a result set then it does in the Appbuilder. So for example a browse in the AB with a FOR EACH table-name which has about 1500+ records takes less than 3 seconds to populate. In OEA it takes close to 60 seconds to bring back the same result set in either an IG UltraWinGrid or MS DataGridView. Both the AB and OEA are connecting to the same DB which is not local but the AB use a .pf file for its connection parms where as I am setting up the DB coonection via the connection profile in OEA. Is there something I am missing? I realize this is a broad question but looking for some help.

Thanks,

Brad

All Replies

Posted by Admin on 29-Apr-2010 13:51

I have noticed that the time to run a query in OEA (10.2B) using GUI for .NET whether it be a simple single table query or joined query takes 5 to 6 times longer to bring back a result set then it does in the Appbuilder. So for example a browse in the AB with a FOR EACH table-name which has about 1500+ records takes less than 3 seconds to populate. In OEA it takes close to 60 seconds to bring back the same result set in either an IG UltraWinGrid or MS DataGridView. Both the AB and OEA are connecting to the same DB which is not local but the AB use a .pf file for its connection parms where as I am setting up the DB coonection via the connection profile in OEA. Is there something I am missing? I realize this is a broad question but looking for some help.

 

I guess you're actually not asking about a difference between AppBuilder and OpenEdge Architect. The difference you are experiencing is caused by the difference in how the ABL Browse widget works with a Query and how the GUI for .NET ProBindingSource and the DataGridView do the similar job.

The Browse widgets is highly specialized and optimized. Assuming the Query is perfectly indexed the Browse does not need to read all records. The Browse will only read 50 or 80 records - depending on the fact if it's a joined Query or not (they actual numbers may be slightly different - haven't used that stuff for a while).

The ProBindingSource needs to count all records. For that it needs to evaluate all records of the query. A PRESELECT query does that way better than a FOR EACH query. That's one point you may try. But still the BindingSource needs to read more records.

Try settings the MaxDataGuess Attribute of the BindingSource (available since 10.2B or a 10.2A service pack) to 50. That should bring you to closer results than the Browser. It stops the BindingSource from reading more records until you scroll down.

Additionally when running a Window with a Browser from the AppBuilder that happens by default in the same session as the AppBuidler - that session is already up and ready.

OpenEdge Architect spans a new prowin32.exe for every run - noticeable by the Progress splash screen each time. Then the .NET framework needs to be loaded in that session and then some .NET assemblies. That may cause (on a slow PC) also a few seconds in the beginning of a session.

Posted by kopfb on 29-Apr-2010 14:23

Thanks Mike! I will give that a try.

Posted by kopfb on 30-Apr-2010 10:37

Hi Mike,

I took what you suggested and applied it and it returned results much faster for a single table. My additional question is what if I want to use a hierarchial relationship using a PDS with say two tables joined through relation fields? I tried this and the results were poor at best. I not looking to break any land speed records here with data retreival but there has got to be away to speed it up. Do you have an examples of using the techniques you outline with a PDS using joined tables? Thanks!!

Posted by Admin on 01-May-2010 13:36

I took what you suggested and applied it and it returned results much faster for a single table. My additional question is what if I want to use a hierarchial relationship using a PDS with say two tables joined through relation fields? I tried this and the results were poor at best. I not looking to break any land speed records here with data retreival but there has got to be away to speed it up. Do you have an examples of using the techniques you outline with a PDS using joined tables? Thanks!!

What is causing the delay? Filling the dataset or binding to the grid? The MaxDataGuess property activates a batching scheme between BindingSource and the query.

For a ProDataset you need to implement your own way of batching, based on the OffEnd event of the BindingSource.

This thread is closed