• Previous message: [greg-dev] mark-as-read button
  • Next message: [greg-dev] Etag optimization
  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    [greg-dev] Etag optimization

    Hello,
    
    I have another optimization to suggest... This will not have a dramatic
    impact on load times like theme-caching but nonetheless it is still
    significant. 
    
    The basic idea is that if the browser sends a matching Etag then the
    script should return the correct response code and then quit. This should
    all be done before statements like require_once("init.php"); which take a
    alot of time to be parsed if init.php needs to be loaded and then parsed.
    (nearly 0.5 seconds on my server). This parsing is done every single
    request. So if I load a gregarius page, depending on my config,  it also
    loads ajax.php?js plugins/delicious.php?deljs
    plugins/dblclicktoread.php?dcljs and each of them load init.php in turn
    before checking to see if the Etag matches. You do not save 1.5 seconds
    because all these requests are done in parallel. However the load on the
    server is much less and everything is spiffier. 
    
    If no one has any objections, I will make the necessary changes to the
    code. Php is really bad at caching things. A php caching/compiling system
    like the zend-optimizer or apc or something would speed up gregarius
    tremendously. Has anyone tried doing this? Dreamhost.com has compiled in
    support for a zend-decoder. However zend encoders are very expensive. If
    someone has access to one and is willing to use it for this project, we
    could distribute compiled versions of the gregarius code that would run
    much faster than normal. (I estimate 30 - 50% faster). The other option
    would be to use a free alternative like apc or mmcache, however I dont
    think it is widely supported by shared hosts. 
    
    
    Sameer
    
    Posted by Sameer D'Costa [reply] at Sat Oct 22 19:20:39 CEST 2005