Brad Fitzpatrick (bradfitz) wrote in lj_dev,
Brad Fitzpatrick

BML update

I've finished most the little speed enhancements for LiveJournal .... one of the coolest ones I've yet to do. (I have 5-10 minutes until Blythe comes over... maybe I'll still get it done!)

Anyway, the new code is live now .... it seems faster for me (noticeable on 'static' pages the most... like / and /site/about.bml and stuff). But maybe it just seems faster because I know it's faster. I dunno.

Stuff that's changed:
  • Config is file is only read and parsed once between requests.
  • Template files are only read and parsed once between requests
  • Optional bmlp.cfg directive lets you control whether config file and template files are stat'ed and re-read if they have been modified since the last request, but I have that off for now. Instead, you can HUP the process to make it re-read its files.
  • BML parser was rewritten (as I said yesterday). It's a lot faster. Less code, too, and it's easy to read now.
What I want to do now is provide hints in the template file on blocks to let BML know that expanded blocks don't have to be expanded again, which is a big performance win on pages like /interests.bml?int=sex with a few thousand LJUSER blocks.

Update: yeah, i broke it for a second. it's working now.

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 1 comment