Something on our site was invoking tvi_load_settings(1) hundreds of times per page load (we have a lot of big vocabularies). Added a static variable to cache settings when called for the same $xid and $type multiple times on the same page hit.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 992832-tvi.patch | 2.38 KB | dsobon |
| #2 | 12-01-2011 14.17.png | 78.27 KB | andypanix |
| #2 | 12-01-2011 14.19.png | 60.41 KB | andypanix |
| #1 | tvi-cache_settings-992832-1.patch | 1017 bytes | DanaRoseRoss |
Comments
Comment #1
DanaRoseRoss commentedPatch for above
Comment #2
andypanix commentedSimilar problem on a recent site I've developed. Your patch resolved the issue (see attached images). Thanks
Comment #3
dsobon commentedUnfortunately for me, patch did not change query count at all.
So I decided to have a stab at the problem and obtained the results I needed.
With devel module enabled, on 2-5 page reloads for /users/admin page:
- no-patch: Executed 1109 queries in 414.27 milliseconds.
- my-patch: Executed 174 queries in 91.06 milliseconds.
Comment #4
dsobon commentedPatch.
Comment #5
duaelfrClosing old issues. Feel free to reopen if needed.
Comment #6
avpaderno