Page 2 of 2

Posted: 06 Jul 2005 17:51
by admin
JustinF wrote:I wish I had good news, unfortunately I still have the delay. :( Using McAfee virus scan v9.1.
Hmm, well, it was a try. So now we know McAfee can't be fooled that easily.

But strange it is. Is TV3 the last program on earth using INI-files?

Posted: 06 Jul 2005 18:01
by JustinF
I just downloaded a program called Safarp. It uses an ini file and I don't notice any delay when it writes back to the file...of course Safarp's ini file has about 1/20th the amount of data in it, so this may be like comparing apples to oranges.

Posted: 06 Jul 2005 18:09
by admin
Yes, the amount is crucial, of course. My TV3-ini has 400 lines = 400 write operations. The other factor is whether the program saves all its stuff together on exit (as TV3 does).

BTW, I have AntiVir Guard (a German freeware virus scanner; same letters but not the same as AVG) and here the trick worked well! Exit time went down from about 3 seconds to zero.

Posted: 06 Jul 2005 18:27
by spinner
admin wrote:I could try a trick which should work if those scanners are after *.INI files looking like INI-files: temporarily write to some xyz.tmp file (hopefully ignored by the scanner) and then rename it to TrackerV3.ini. This way it should be scanned only once, right?
Or does AVG scan every file that is written?
AVG Free can be set to scan either:

(a) all files of all types

(b) potentially virus-carrying files (eg executable type, double extensions, etc)


I guess that most people have got this set to (b).

Further, I would have guessed that (b) excludes INI files. However when I temporarily suspend AVG Free's "Resident Shield" then TV3 exits very quickly just like it used to in the old days! YAY!!! I guess AVG just wants to check out files like BOOT.INI. WIN.INI and maybe it goes through them line by line.

Posted: 06 Jul 2005 18:36
by spinner
JustinF wrote:I just downloaded a program called Safarp. It uses an ini file and I don't notice any delay when it writes back to the file...of course Safarp's ini file has about 1/20th the amount of data in it, so this may be like comparing apples to oranges.
This thread makes me reflect on the other programs which take almost "for ever" to close and for me they are Xnews and Eudora. And both use INI files: my Xnews's main INI file is 300 lines (but it also has eight other much smaller INI files) and my Eudora's INI is 4,100 lines.

By contrast, my Opera has a reasonably big INI file (almost 1,100 lines in my case) but it closes very quickly indeed.

This is starting to sound like an AVG bug.

Posted: 06 Jul 2005 18:39
by admin
spinner wrote:This is starting to sound like an AVG bug.
But McAfee slows down, too...

Posted: 06 Jul 2005 19:24
by JustinF
admin wrote: But McAfee slows down, too...
Yep. If I disable McAfee, TrackerV3 exits very quickly...if I enable McAfee again, it takes several seconds for TrackerV3 to exit.

Posted: 06 Jul 2005 20:06
by admin
Ok, folks, now I did something more serious: I emulated the WritePrivateProfileString-API, ie I rolled my own INI-writing functions, and my impression is that TV3 now closes faster than ever!

Posted: 06 Jul 2005 20:47
by spinner
admin wrote:Ok, folks, now I did something more serious: I emulated the WritePrivateProfileString-API, ie I rolled my own INI-writing functions, and my impression is that TV3 now closes faster than ever!
It works for me! And I have to agree that it definitely seems faster here too! :-)

Very nice. Well done.

Posted: 06 Jul 2005 22:58
by JustinF
admin wrote:Ok, folks, now I did something more serious: I emulated the WritePrivateProfileString-API, ie I rolled my own INI-writing functions, and my impression is that TV3 now closes faster than ever!
Works for me, too. Thanks! After I restarted TrackerV3 I had to make sure I had the "Save settings on exit" option checked...it closed down so fast. :shock:

Just out of curiosity, are you now just opening/closing the file once instead of once for every line?

Thanks again,
Justin

Posted: 07 Jul 2005 05:50
by Gandolf
Excellent!! I don't know what you have done but it works a treat!

Posted: 07 Jul 2005 07:36
by peterbonge
Same here with AVG. Really fast. Great work!

Posted: 07 Jul 2005 10:09
by admin
JustinF wrote:Just out of curiosity, are you now just opening/closing the file once instead of once for every line?
Yes. The API I used before did open-write-close the file for each and every value -- really dumb. Now I simply open-writeallvalues-close.

I felt a slight irony there working on making my program shut down faster... :wink: