[wp-trac] [WordPress Trac] #27389: MCE Views for Audio/Video
WordPress Trac
noreply at wordpress.org
Wed Apr 9 05:11:21 UTC 2014
#27389: MCE Views for Audio/Video
----------------------------+-------------------------
Reporter: wonderboymusic | Owner:
Type: task (blessed) | Status: reopened
Priority: normal | Milestone: 3.9
Component: Media | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch | Focuses: javascript
----------------------------+-------------------------
Comment (by wonderboymusic):
[attachment:27389.combined.diff 27389.combined.diff] combines the patches.
As far as memory management goes, TinyMCE itself leaks memory. My initial
profiling ([attachment:empty-editor.png empty-editor.png]) was done
against an empty Visual editor, each additional profile was done by going
from Visual-Text-Visual then taking another snapshot. The second set of
snapshots ([attachment:one-audio.png one-audio.png]) was done with one
audio player in the editor. I did some other tests with 21 players in the
editor and the ratios were the same.
My code in the patch ensures that MediaElement's cleanup routine is run on
every player when TinyMCE rebuilds itself, even when multiple players are
bound to the same view - this happens when duplicate shortcodes exists. I
tested this with 20 players, 7 being the exact same.
On page load, the players are initialized after a 500ms timeout to ensure
that the stylesheets are loaded. Subsequent builds happen after a 10ms
refresh. The broken looking players in FF were due to a race condition
with the editor stylesheet.
The patch also contains @gcorne's view refresh fixes in `wp.mce.View`
--
Ticket URL: <https://core.trac.wordpress.org/ticket/27389#comment:25>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list