
Good day,
In v1.2 the class file, "class.asp", is rather large.
I duplicated it, but kept only the stuff that was necessary for the tracking purpose and then named it "track_class.asp". Afterall, only about 15% of the content of the "class.asp" file is needed for the tracking.
From a 200K file, it went down to roughly 32K, although I still have quite a few variables that are defined but not used, however this is part of the final cleanup phase.
BTW, I was successfull to got to a small size like this only because I changed the Get___Array() routines so that they will pull their respective information from a configuration database and populate the appropriate arrays via GetRows() thus cutting another good 42K from the overall script size.
I then changed the include in the "track.asp" file to point to the "trimmed down" file. I noticed "Signigicant" improvements on the overall response time on the server where my site is hosted.
I thought people could benifit of the little tweak.
Regards.
Improve speed while tracking.
quote:Originally posted by Daniel
Good day,
In v1.2 the class file, "class.asp", is rather large.
I duplicated it, but kept only the stuff that was necessary for the tracking purpose and then named it "track_class.asp". Afterall, only about 15% of the content of the "class.asp" file is needed for the tracking.
From a 200K file, it went down to roughly 32K, although I still have quite a few variables that are defined but not used, however this is part of the final cleanup phase.
BTW, I was successfull to got to a small size like this only because I changed the Get___Array() routines so that they will pull their respective information from a configuration database and populate the appropriate arrays via GetRows() thus cutting another good 42K from the overall script size.
I then changed the include in the "track.asp" file to point to the "trimmed down" file. I noticed "Signigicant" improvements on the overall response time on the server where my site is hosted.
I thought people could benifit of the little tweak.
Regards.
I'm not sure if I understood this... but does your 'Tweaked' (Slimmed Down) tracking page still track all the same stuff? Or are you only tracking certain items?
Also, Would you be willing to share this 'Tweak' of yours?
TechStud,
www.TechStud.com
Improve speed while tracking.
TechStud,
Let's do it the simple way, just to evaluate the improvement on your end. We'll limit the first test to the bare minimum, cutting roughly 2800 lines of code without a glitch on what is being evaluated/stored by the tracker.
Take the "class.asp" page, then make a duplicate of it using another name so let say "tracker_class.asp".
Before going any further, I don't know if you're using a timer to evaluate the necessary time to generate a page, but I do. This would be a solid reference to compare the results if you put something like that on your site.
Ok, open the "tracker_class.asp" file, and do a find on "Sub GenerateReport". That should be around line 300 or so. Then select the text while scrolling down, up to the "End Sub", which should be around line 3000-3100.
Simply delete that block. The GenerateReport routine is used ONLY by the reporting part of the tool, and is not required for the tracking.
Also, in the "* DATA GENERATION *" section of the code, further down the file, all the "Generate___Data()" functions/routines can be safely removed. They also are used strictly during the "reporting" phase.
Save the file. Now the "tracker_class.asp", will be trimmed down by quite a few kilobytes.
Once saved, edit the "track.asp" page, and change the include so that it will point to the "tracker_class.asp" file instead of the "class.asp" one.
Only with that little "tweak" you should see improvements with the time it takes to load the tracked pages.
As far as providing the remaining part of the code, or actually the code as I adapated to my needs, this could be going against Chad's policy as to distribute a modified version of his good work.
I would rather prefer having him looking at the code, and see by himself if there is a justification to implement such an approach on the next release he will make available to the other people too.
If this is not going against the agreements, I could zip up the files I created, then having you evaluate the results of my adapted version.
Anyway, if you know VBScript well enough, you will be able to pinpoint the rountines that are not used/called by the logging process, and remove them safely from the "tracker_class.asp" file. The more time you will take at filtering what is needed for the logging process, and remove the non-required stuff, the more you and your users will benifit from it.
Let me know how it went.
Regards.