| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 1979658-4-eck-clear-cache-save.patch | 4.85 KB | tstoeckler |
| #4 | interdiff-2-4.txt | 702 bytes | tstoeckler |
| #2 | 1979658-2-eck-clear-cache-save.patch | 4.28 KB | tstoeckler |
| #2 | interdiff-1-2.txt | 688 bytes | tstoeckler |
| #1 | 1979658-1-eck-clear-cache-save.patch | 4.23 KB | tstoeckler |
Comments
Comment #1
tstoecklerHere we go. Most of the changes are pretty non-controversial, I think. The Features Import will suffer a performance decrease after this, because previously the caches were only cleared once after saving all entity types. Now the caches are cleared multiple times. Especially the schema cache clearing and menu rebuilding are heavy I think.
For the latter, though, we shouldn't be calling menu_rebuild() ourselves but doing variable_set('menu_rebuild_needed', TRUE);
Follow-up for that coming.
Comment #2
tstoecklerHere we go. Now the only notable performance decrease is the schema cache clear. Without having benchmarked that, though, I think that's an acceptable drawback to this consolidation of code and (arguably) a bug fix (from the perspective of an API consumer).
Comment #3
tstoecklerI found #1980152: [documentation or bug] drupal_flush_all_caches() does not clear drupal_get_schema() static cache, so we should add the schema cache reset on delete() as well.
Comment #4
tstoecklerHere we go. Bundle did not have a delete() yet, so I added it.
Comment #5
tstoecklerSetting to needs review again.
Comment #6
kaizerking commentedThis worked
Comment #7
acrazyanimal commentedThanks for all the work on this. Its great to have the extra eyes on it.
To clarify, the reason I put the cache clearing in the form submits was that it was more efficient that way. I figure anyone using the API could just call
EntityType::loadAll(NULL, TRUE)andBundle::loadAll(NULL, TRUE)after creating/deleting/updating their entities. It would actually be more efficient that way as well, because you'd only call it once after you've performed the actions in code and you're all finished.Any thoughts?
Comment #8
acrazyanimal commented@tstoeckler I committed the fixes you added for clearing the menu using the menu_rebuild_needed variable and for resetting the schema cache on bundle delete, but I'm reluctant to add the changes for clearing the ECK caches within the entity objects.
Comment #9
acrazyanimal commentedFor reference the commit of the menu and schema cache rebuilding is here: http://drupalcode.org/project/eck.git/commit/c99e975
Comment #10
tstoecklerI'm personally not married to the cache clearing in the API functions, but I do think it is clearer conceptually.
If you're concerned about Performance we could do the cache clearing in shutdown functions. That would probably done in a similar fashion to the 'menu_rebuild_needed' variable. We could simply set a 'entity_cache_rebuild' (or a better name thereof) variable and if that is set,
todo all that cache clearing in 'eck_shutdown_function'. Thoughts?Comment #14
legolasboClosing old issues. Please reopen the issue with a clear description and/or steps to reproduce if this issue is still relevant.
Comment #15
legolasbo