Optimisation of load_tables()
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
php-gettext |
Fix Released
|
Low
|
Данило Шеган |
Bug Description
Got this email from Andrew Donkin:
> I haven't tested this but looking at the code it seems to me that
> load_tables() is seek()ing far more often that it needs to, if cache
> mode is disabled.
>
> function load_tables() {
> if (is_array(
> is_array(
> is_array(
> return;
>
> $this->
> load_tables() always performs the seeks and reads to initialise
> table_originals and table_translations.
Above statements are correct, so the only reasoning behind current behaviour might be that it allows MO files to change while application is executing. Not a very convincing reason to keep it, especially since you'll want to disable cache only for very large files where the memory footprint will outweight the benefits of caching.
So, let's fix it.
Related branches
Changed in php-gettext: | |
milestone: | none → 1.0.10 |
Changed in php-gettext: | |
status: | Fix Committed → Fix Released |
Fixed in r45 of lp:php-gettext.