summaryrefslogtreecommitdiff
path: root/lib/jquery.form.js
diff options
context:
space:
mode:
authorAndy Staudacher <andy.st@gmail.com>2010-02-21 20:04:06 -0800
committerAndy Staudacher <andy.st@gmail.com>2010-02-21 20:04:06 -0800
commit5ddd7c9677b644396981de7df8176a3b168ffe21 (patch)
tree6e99cebfd236c22d1176163c68f3b06036ed5e5a /lib/jquery.form.js
parentbe20309259de9310da3be703c93c4e42def2541b (diff)
Fix Kohana's internal cache for Gallery's usage pattern.
Adds a core.internal_cache_read_only config variable to Kohana's internals. Kohana's internal_cache for find_file wasn't working in Gallery because the cache would be emptied on each request after reading it from disk and before most lookups would run. 1. Bootstrap sets initial core.modules (= include path): forge, kohana23_compat, gallery. 2. Kohana::setup() loads find_file cache from disk. 3. Gallery loads list of active modules and themes, and updates the core.modules value (=include path), which forces the internal find_file cache to be empties (which makes sense). 4. Request processing starts, and thus 80% of all Kohana::find_file() triggered is_file() invocations start off with an empty find_file cache. In the case of my small Gallery installation, we're talking about 3100 is_file() invocations per request with or without internal_cache enabled. With this fix, this number is down to 800 invocations. The basic idea is that we treat the cache as read only and don't write any (possibly dirty) values to it in memory until we're sure that the include path won't change later on in the request processing. Once we know the list of active modules and themes, we can update core.modules and finally flip the read-only state of the cache and start writing to it.
Diffstat (limited to 'lib/jquery.form.js')
0 files changed, 0 insertions, 0 deletions