Slow startup

robmh

Member
Licensed User
Longtime User
Hi

I've written a program based around SQLite which runs fine on my PPC but takes 10s or so to load.

Is this normal?

Is it related to the .NET 2.0 framework that the SQLite dll needs?

Is there any way of reducing this delay?

BTW, I'm using a Fujitsu Pocket Loox C550 which has a 520MHz CPU.

Thanks
 

agraham

Expert
Licensed User
Longtime User
Are you running any long loops in your startup? You have to bear in mind that one of the tradeoffs of B4PPC is that it trades simplicity for raw performance as it is effectively interpreted at runtime. Normally this doesn't matter for handheld (or even a lot of desktop) applications as they spend most of their time waiting for user input and the compute intensive graphics processing is provided in big lumps by the underlying platform.

Can you spread some of that initialization over a longer period of time - say doing it in one second lumps when the user takes some action that needs that initialization done?
 

RandomCoder

Well-Known Member
Licensed User
Longtime User
I've not used SQLite myself (it looks mightly complicated) but I have read every post in this forum and Erels response to this type of problem is generally only to load the information that is relevant to the user rather than loading the complete database.
Is that something that you could look at doing within your application?

Another trick that I have used in the past is to use DoEvents so that the screen is updated with information to show that something is being done in the background. This has the added disadvantage that the CPU now has to cope with updating the screen alongside calulating or loading the other data. But at least the user gets to see something other than the wait cursor.

Regards,
RandomCoder.
 

robmh

Member
Licensed User
Longtime User
Thanks for your responses.

Are you running any long loops in your startup? You have to bear in mind that one of the tradeoffs of B4PPC is that it trades simplicity for raw performance as it is effectively interpreted at runtime. Normally this doesn't matter for handheld (or even a lot of desktop) applications as they spend most of their time waiting for user input and the compute intensive graphics processing is provided in big lumps by the underlying platform.

Can you spread some of that initialization over a longer period of time - say doing it in one second lumps when the user takes some action that needs that initialization done?

I'm not running any loops. I simply load the data, setup a few controls and open the main form.

I've not used SQLite myself (it looks mightly complicated) but I have read every post in this forum and Erels response to this type of problem is generally only to load the information that is relevant to the user rather than loading the complete database. Is that something that you could look at doing within your application?

Another trick that I have used in the past is to use DoEvents so that the screen is updated with information to show that something is being done in the background. This has the added disadvantage that the CPU now has to cope with updating the screen alongside calulating or loading the other data. But at least the user gets to see something other than the wait cursor.

I'm loading less than 100 records. Also, running a different query and loading a table from the resulting data only takes a second or two.

The SQLite library itself doesn't take 10 seconds to start.
You could see the SQLExample (downloads page) that starts quickly.

The SQL example takes 9s to load and my app takes 12s.

A simple aplication with a single form and a few controls running under .NET CF 2.0 takes 6s.

I assume that when you say "starts quickly" you mean in much less than 9s.

If so, it would appear that the problem lies with my PPC or something in its setup.

Note that I tried setting the CPU speed to "turbo" and re-installing .NET CF but with no effect.
 
Top