I have just uploaded WhosOnCFC 2.2.5 to RIAForge. I am not on my main computer so I cannot update the source on GitHub.
It has been quite some time since my last update the the core component that handles user tracking; most of the recent changes have involved updated viewers and the like. In this update I have basically rewritten the WhosOnPageTracker() which is the main method that ties everything together. Yesterday, Kevin M., a user pinged me to let me know he was interested in using WhosOnCFC to track users on his web site, but when he installed it he noticed a substantial decrease in speed. He asked if I could make any suggestions to make things run a bit faster.
Looking through the code I saw quite a few spots where things could definitely be optimized. Here is a quick run-down of what was done:
- ignoreDomains, ignoreIPs, and botList check is now run on the first hit on the site. Version prior to 2.2.5 checked these on every request which slowed down execution time, especially if you have a long botList. WhosOnCFC still checks for ignorePages on every request, but generally this list is very small.
- When looping over lists I set a variable to the list length instead of evaluating it in the for loop. The speed increase is probably marginal but every little bit counts.
- Reorganized the function to streamline execution.
- Added execution time (execTime) to the user data so you can see how long WhosOnPageTracker() took for each user.
- Added the WhosOn Dump page back in.
- Added a link to jView (jQuery viewer) on the main screen. Looks like I forgot that in the last release.
Check it out and please let me know if you encounter any errors.