[EMAIL PROTECTED] wrote: > Are you really sure to fork a php interpreter instance for every single > request that hits your web server? > (In reference to > http://firestats.cc/browser/trunk/firestats/integration/django/firestats.py)
Hi, I am the FireStats developer. While this is not ideal, it's not really a serious performance hit: $ time php -r "echo phpinfo();" >> /dev/null real 0m0.018s starting a php instance from the shell on my server takes 18 ms (38 for the first time, around 18 for the rest), so the overhead is pretty minimal. Calling the actual thing is also pretty fast: $ time php -r '$_SERVER["REMOTE_ADDR"]="66.249.66.81";$_SERVER["HTTP_USER_AGENT"]="Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)";$_SERVER["REQUEST_URI"]="http://firefang.net/projects/firestats/log/trunk/firestats/img/browsers/lg.png";$_SERVER["HTTP_REFERER"]="";include("/www/firestats-dev/php/firestats-hit.php");' real 0m0.041s user 0m0.036s sys 0m0.004s 40 ms, and I bet most of it is in mysql or doing IO. so, generally I don't think its a serious hit, although a cleaner solution would be appreciated. btw: I use the same method to integrate with trac, and its pretty solid. Omry. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---
