This patch caches Quick stats and Progress stats statistics on Translate page. Caching for one hour and clearing by cron.

Actually, proposed function is very similar to l10n_community_get_string_count but the second gives a little bit different results and doesn't support filtering by language. I will probably propose another patch, caching results of this function.

This speeds up "Translate" and "[Language name] overview" pages from 4 seconds to 0.05 seconds using performance tuning database #323392: Add more targeted indexes. Please note that we can't rely on query cache here, it will probably get filled by other queries.

Comments

meba’s picture

Status: Active » Needs review
gábor hojtsy’s picture

Status: Needs review » Fixed
StatusFileSize
new8.28 KB

Looks great, thanks for this improvement! I've fixed a few code style problems and committed this patch to the Drupal 5 and 6 version. My intention is to keep improving the Drupal 6 version. I am committing this to Drupal 5 so that you can continue your performance improvements there without interruption.

The code style problems
- phpdoc comments did not start with two *
- } else { on same line is not good
- concatenation whitespaces

meba’s picture

Status: Fixed » Needs review
StatusFileSize
new1.72 KB

You forgot that API for cache changed from D5 -> D6.

Attaching a fix.

P.S.: Can you please let me know on skype when you commit this? I would like to know if my email is working again :)

meba’s picture

Status: Needs review » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.