You are viewing Revision 1 of Discuss_Script_Flow

This page is registered as a special page, however you are viewing a previous revision of the page. As such, the special page function will not be triggered.

There has been some thought about moving DoVisit to before (or even during) DoRequest. The benefit of this would be that when the site administrator views the 'visitors' action from the administrative menu, the list would be completely up to date (as it is right now, it will not show the current request).

However, due to the way DoVisit works, I'm leaning heavily against this. DoVisit will attempt to get an exclusive lock on the $VisitorLog before it attempts to write to it. If it can't obtain a lock, then it will wait until it can. I implemented this so that even on very busy sites, every visit would be captured.

The reason I want DoVisit to run after DoRequest is due to the (perceived) speed decrease that would cause. Aneuch since version 0.30 has not buffered its output, meaning when it sends out data it is sent out right away. This translates to a fast display of the requested page. If DoVisit is called before the page data is displayed, and the site is very busy, the user will have to wait for his output until the exclusive lock is obtained, the visit data is written to the log, and the file is closed. Though the total time for the visit is the same, it's perceived to be faster if DoVisit is run after DoRequest (since the output will be shown on the screen, the user will not really know that the script is stalled waiting to write to $VisitorLog).

-- AaronGraves Mon Aug 12 17:00:42 UTC 2013 (69.4.28.21)