Download & Extend

Cache wysiwyg_load_includes()

Project:Wysiwyg
Version:7.x-2.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:reviewed & tested by the community

Issue Summary

This function takes around 3% of page execution time on node view (due to the comment form) on a D7 site I'm developing. Seems very cacheable.

AttachmentSize
includes.patch2.34 KB

Comments

#1

Nice but didn't work for me, since we still need to include the files when loading lists from cache in wysiwyg_load_all_includes(). Also added reset flags at appropriate places, which are triggered on the wysiwyg profiles admin pages to reset the cached editor and plugin lists. Patches for D7 and D6 attached.

AttachmentSize
841794-include-D7.patch 5.99 KB
841794-include-D6.patch 6 KB

#2

Still applies, re-rolled d7 patch for fuzz/offset/windows line breaks.

AttachmentSize
841794-include-D7.patch 5.42 KB

#3

AttachmentSize
wysiwyg.cache-includes.3.patch 5.44 KB

#4

Status:needs review» reviewed & tested by the community

Looks good. And coder module has no complaints.

#5

Won't this break plugins which add additional scripts in hook_wysiwyg_plugin(), like media module does?
For reference: #1039076: Allow plugins to specify libraries and multiple javascript files

#6

I did a quick test with the media module. It's media browser icon still works fine with the patch.

wysiwyg_get_all_plugins already has some caching, this is more about the lower level of which include files to load.

nobody click here