Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


Slow startup


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-10-2007, 11:03 AM
Newbie
 
Join Date: Jun 2007
Location: UK
Posts: 8
Default Slow startup

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
Reply With Quote
  #2 (permalink)  
Old 07-10-2007, 11:19 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 1,687
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

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?
Reply With Quote
  #3 (permalink)  
Old 07-10-2007, 12:12 PM
RandomCoder's Avatar
Basic4ppc Veteran
 
Join Date: May 2007
Location: UK
Posts: 485
Awards Showcase
Beta Tester 
Total Awards: 1
Default

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.
__________________
Desktop: Pentium D 920 (2.8GHz, 4MB L2 Cache, 800MHz FSB), 1024MB, 256MB Radeon X600, 250GB HD.
Device : Axim X51v XScale 624MHz, 3.7" VGA, 64MB SDRAM, 256MB Flash ROM + 1Gb SD.

"Defeat never comes to any man until he admits it."Josephus Daniels
Reply With Quote
  #4 (permalink)  
Old 07-10-2007, 01:08 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,132
Default

The SQLite library itself doesn't take 10 seconds to start.
You could see the SQLExample (downloads page) that starts quickly.
Reply With Quote
  #5 (permalink)  
Old 07-10-2007, 09:43 PM
Newbie
 
Join Date: Jun 2007
Location: UK
Posts: 8
Default

Thanks for your responses.

Quote:
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.

Quote:
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.

Quote:
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.
Reply With Quote
  #6 (permalink)  
Old 07-11-2007, 05:02 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,132
Default

It takes 2-3 seconds to load the SQL compiled example on a WM2003 device with 400 mhz (HP ipaq).
You could use the FormLib library to minimize your application instead of closing it.
This way it will only do a full start once.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Slow Replace in Table Zenerdiode Questions & Help Needed 6 09-22-2008 10:33 PM
CSV file read still slow in V6.01 but other tasks much improved HarleyM Questions & Help Needed 3 01-27-2008 11:18 AM
Very slow IDE since B4PPC Ver 5 eclipse_wolfgang Questions & Help Needed 5 10-31-2007 12:49 AM
B4PPC window size on startup bug? agraham Bug Reports 2 09-20-2007 09:12 AM
Slow day at the shop... Cableguy Chit Chat 0 05-09-2007 10:32 PM


All times are GMT. The time now is 12:31 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0