AutoHotkey Community

It is currently May 25th, 2012, 8:25 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Can i speed up inireads
PostPosted: June 14th, 2007, 3:09 pm 
Offline

Joined: June 5th, 2007, 10:57 pm
Posts: 89
Location: USA
i have notices that if i do many consecutive ini reads before creating a gui, my exe takes forever (4+ seconds) to display the gui so i conclude that it is likely that the inireads are causing the problem. i would do about 30 inireads and i have about 30 lines of gui. i don't have the script with me at this time so im not entirely sure of the number of lines. but i do remember that cutting some inireads greatly sped up the loading of the gui.

can i still take neumerous pieces of data from an ini file like that and do it quickly?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 14th, 2007, 5:37 pm 
Offline

Joined: April 19th, 2006, 1:02 pm
Posts: 386
Make sure you didn't leave a sleep somewhere between the lines.
This happend to me as i debugged my settings loading routine with sleep and tooltip. 30 inireads shouldn't take that long.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 14th, 2007, 6:55 pm 
Offline
User avatar

Joined: August 11th, 2004, 1:47 am
Posts: 5346
Location: UK
IniRead opens and closes files each time which makes it very slow. You can avoid this by making the DllCalls yourself or switching to a better data storage system like the registry, XML or SQLite.

_________________
GitHubScriptsIronAHK Contact by email not private message.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 14th, 2007, 7:47 pm 
Offline

Joined: May 24th, 2007, 3:45 am
Posts: 1121
If IniRead is really that slow, Loop, Read might be worth considering. At least doesn't have to open and close the file for each line. You could still use IniWrite to save settings, since you presumably don't need to do that as often.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 14th, 2007, 8:32 pm 
Offline

Joined: June 5th, 2007, 10:57 pm
Posts: 89
Location: USA
tks guys that's kinda what i thought


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: BrandonHotkey, Exabot [Bot], gemisigo, Google Feedfetcher, KenC, Maestr0, toddintr, Yahoo [Bot] and 63 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group