Thursday, September 23, 2010

Scale up

Narro was designed with one pair of languages in mind. And at that time, running an import on a big project on a modern computer for half an hour was acceptable. The only performance goal was to have a maximum page loading time of 1 second. There was no goal set for the import process.

Back then: 1 target language * 1 big project * 1/2 hours

Times are changing and the instance hosted on Mozilla grew to 61 languages. For each language I run an import on 4 big projects.

Right now: 61 target languages * 4 big projects * 1/2 hours

As you see, running the import process in these conditions is almost impossible, so the much postponed step of optimizing the code is absolutely necessary right now.

Note that the import process is running in background and eating up all the CPU power available on the server.

Fortunately, the code is ready for such optimizations which are:
  • cache database results whenever possible
  • do stuff only when necessary
  • use regular expressions only when really needed
So that's what I'll be working on before doing any release.