[wp-trac] [WordPress Trac] #12921: Improve word count
WordPress Trac
wp-trac at lists.automattic.com
Wed May 5 23:09:55 UTC 2010
#12921: Improve word count
-------------------------+--------------------------------------------------
Reporter: shdus | Owner:
Type: enhancement | Status: reopened
Priority: normal | Milestone: Unassigned
Component: Editor | Version: 3.0
Severity: normal | Resolution:
Keywords: has-patch |
-------------------------+--------------------------------------------------
Comment(by azaozz):
Replying to [comment:6 koopersmith]:
> it's creating (not executing) an anonymous function...
It's creating a new function on every keyup? Typing a 2,000 words post X
average of 5 keystrokes per word = 10,000 new lambda functions, starting
to look like memory leak :)
A lot of testing went into making this plugin. It's a "nice to have"
(secondary) feature so it shouldn't interfere with the main feature
(typing) at all or it becomes pointless.
At first it used to update the word count every 10 sec but if the user was
typing fast in a slower browser or on slower computer, sometimes there was
a very annoying lag/skipping when it was running. The best time to update
the count is when the user pauses typing for a moment. Nearly all users
pause when starting a new paragraph or use the backspace key, so running
the count then makes any lag virtually unnoticeable.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/12921#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list