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.

Speed of the compiled application?

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-10-2008, 01:10 PM
Junior Member
 
Join Date: Mar 2008
Location: Thailand
Posts: 46
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, 01:34 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,733
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
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, 01:43 PM
Junior Member
 
Join Date: Mar 2008
Location: Thailand
Posts: 46
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, 01:45 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,733
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
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, 01:54 PM
Junior Member
 
Join Date: Mar 2008
Location: Thailand
Posts: 46
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 01:56 PM.
Reply With Quote
  #6 (permalink)  
Old 03-12-2008, 11:59 PM
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 Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiled Properties Zenerdiode Basic4ppc Wishlist 2 03-06-2009 07:08 PM
Compiled version 6.05 and SQL BjornF Questions (Windows Mobile) 2 02-13-2008 02:30 PM
Compiled 1/2 size bdiscount Questions (Windows Mobile) 1 01-09-2008 03:05 PM
Speed grgczyz Basic4ppc Wishlist 3 05-31-2007 12:55 PM
Control Speed of car JJM Share Your Creations 0 05-27-2007 02:40 PM


All times are GMT. The time now is 08:56 AM.


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