AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Can i speed up inireads

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
philz



Joined: 05 Jun 2007
Posts: 87
Location: USA

PostPosted: Thu Jun 14, 2007 3:09 pm    Post subject: Can i speed up inireads Reply with quote

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?
Back to top
View user's profile Send private message Send e-mail
foom



Joined: 19 Apr 2006
Posts: 386

PostPosted: Thu Jun 14, 2007 5:37 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Titan



Joined: 11 Aug 2004
Posts: 5068
Location: imaginationland

PostPosted: Thu Jun 14, 2007 6:55 pm    Post subject: Reply with quote

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.
_________________

RegExReplace("irc.freenode.net/ahk", "^(?=(.(?=[\0-r\[]*((?<=\.).))))(?:[c-\x73]{2,8}(\S))+((2)|\b[^\2-]){2}\D++$", "$u3$1$3$4$2")
Back to top
View user's profile Send private message Visit poster's website
ManaUser



Joined: 24 May 2007
Posts: 901

PostPosted: Thu Jun 14, 2007 7:47 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
philz



Joined: 05 Jun 2007
Posts: 87
Location: USA

PostPosted: Thu Jun 14, 2007 8:32 pm    Post subject: Reply with quote

tks guys that's kinda what i thought
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group