Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

Slow startup

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-10-2007, 10: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, 10:19 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
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, 11:12 AM
RandomCoder's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Location: Derbyshire, UK
Posts: 623
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.
__________________
"Defeat never comes to any man until he admits it."Josephus Daniels
Reply With Quote
  #4 (permalink)  
Old 07-10-2007, 12:08 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,734
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
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, 08: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, 04:02 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,734
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
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 Off
Pingbacks are Off
Refbacks are On

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


All times are GMT. The time now is 10:47 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0