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.


Speed of the compiled application?


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-10-2008, 02:10 PM
Junior Member
 
Join Date: Mar 2008
Location: Thailand
Posts: 45
Default Speed of the compiled application?

Hi

At the moment I'm using the basic4ppc trial - and I must say I like the way it is working for my simple database app especially developing on the ppc.

My question is how much faster will the compiled app be - or does it depend on what the app does? The operation that takes longest in my app is looping through Fileread lines from a large file - will that be much faster in the compiled app?

Thx
Reply With Quote
  #2 (permalink)  
Old 03-10-2008, 02:34 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,199
Default

On average, compiled applications run about 3-4 times faster.
However it can change between different programs.
What are you doing with each line?
Reply With Quote
  #3 (permalink)  
Old 03-10-2008, 02:43 PM
Junior Member
 
Join Date: Mar 2008
Location: Thailand
Posts: 45
Default

Wow - that was a quick reply - you must live on this forum !!

What am I doing with each line?

I have a text file of several thousand lines, and I want to loop through until I reach a certain line, say, line 1400, and then add lines 1401 to 1430 to a string. So I guess the quickest way to get to line 1400 is to fileread 1400 times!?
Reply With Quote
  #4 (permalink)  
Old 03-10-2008, 02:45 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,199
Default

Using an SQL database will be much faster (you will be able to load the right lines immediately).
Reply With Quote
  #5 (permalink)  
Old 03-10-2008, 02:54 PM
Junior Member
 
Join Date: Mar 2008
Location: Thailand
Posts: 45
Default

Thanks Erel. I'll look into that.

Actually, I forgot to say that some of the time I'm checking each line for a certain chr, and if it exists (as it does about 1/3rd of the time), then I'm taking a substring of the line and adding it to a table. But I would expect that to be a lot slower than just Filereading a line. I thought the simple Filereads to loop to a certain line might be much faster when compiled.

Anyway, no worries!

Last edited by JamesC : 03-10-2008 at 02:56 PM.
Reply With Quote
  #6 (permalink)  
Old 03-13-2008, 12:59 AM
Junior Member
 
Join Date: Dec 2007
Posts: 27
Default

If you are checking for a certain chr then the quick way if you don't wish to use sql is read the whole file into a variable and search from there. You can use a text box for this but a variable is definitely quicker as I have tested this in one of my programs. If the file is too big for memory then you can read it in chunks.
e.g. read from pos 0 to 1000 and 1001 to 2000 and so on.

You can then get the char position within the variable and manipulate the string as you were doing. It is file access that is slowing this down.
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
Compiled Properties Zenerdiode Basic4ppc Wishlist 1 08-14-2008 07:06 AM
Compiled version 6.05 and SQL BjornF Questions & Help Needed 2 02-13-2008 03:30 PM
Compiled 1/2 size bdiscount Questions & Help Needed 1 01-09-2008 04:05 PM
Speed grgczyz Basic4ppc Wishlist 3 05-31-2007 01:55 PM
Control Speed of car JJM Share Your Creations 0 05-27-2007 03:40 PM


All times are GMT. The time now is 02:53 AM.


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