Closed Bug 21247 Opened 25 years ago Closed 25 years ago

[Dogfood]Typing is very slow (key event handling is slow)

Categories

(Core :: XUL, defect, P2)

defect

Tracking

()

VERIFIED DUPLICATE of bug 21885

People

(Reporter: sfraser_bugs, Assigned: hyatt)

References

Details

(Whiteboard: [PDT-])

Typing in composer and mail compose is very slow today; text fields are OK.

We seem to be trying to load a keybindings document for every key press; here's a
stack:

  09E580C0    PPC  1BB20B0C  PresShell::HandleEvent(nsIView*, nsGUIEvent*,
nsEventStatus*)+20B0C
  09E58040    PPC  1BC59184  nsHTMLHtmlElement::HandleDOMEvent(nsIPresContext*,
nsEvent*, nsIDOMEvent**, unsigned int, nsEventStatus*)+59184
  09E57FF0    PPC  1BB020A0  nsDocument::HandleDOMEvent(nsIPresContext*, nsEvent*
, nsIDOMEvent**, unsigned int, nsEventStatus*)+020A0
  09E57F80    PPC  1D619E5C  GlobalWindowImpl::HandleDOMEvent(nsIPresContext*,
nsEvent*, nsIDOMEvent**, unsigned int, nsEventStatus*)+0007C
  09E57F20    PPC  1D5C1C38  nsXULElement::HandleChromeEvent(nsIPresContext*,
nsEvent*, nsIDOMEvent**, unsigned int, nsEventStatus*)+C1C38
  09E57EE0    PPC  1D5BCB10  nsXULElement::HandleDOMEvent(nsIPresContext*,
nsEvent*, nsIDOMEvent**, unsigned int, nsEventStatus*)+BCB10
  09E57DA0    PPC  1D5BCB10  nsXULElement::HandleDOMEvent(nsIPresContext*,
nsEvent*, nsIDOMEvent**, unsigned int, nsEventStatus*)+BCB10
  09E57C60    PPC  1D5BCB10  nsXULElement::HandleDOMEvent(nsIPresContext*,
nsEvent*, nsIDOMEvent**, unsigned int, nsEventStatus*)+BCB10
  09E57B20    PPC  1D5BCB48  nsXULElement::HandleDOMEvent(nsIPresContext*,
nsEvent*, nsIDOMEvent**, unsigned int, nsEventStatus*)+BCB48
  09E579E0    PPC  1D53F604  nsXULDocument::HandleDOMEvent(nsIPresContext*,
nsEvent*, nsIDOMEvent**, unsigned int, nsEventStatus*)+3F604
  09E57970    PPC  1BBD90E8  nsEventListenerManager::HandleEvent(nsIPresContext*,
nsEvent*, nsIDOMEvent**, unsigned int, nsEventStatus*)+D90E8
  09E577F0    PPC  1D58E69C  nsXULKeyListenerImpl::KeyUp(nsIDOMEvent*)+8E69C
  09E577B0    PPC  1D58EE08  nsXULKeyListenerImpl::DoKey(nsIDOMEvent*,
eEventType)+8EE08
  09E57390    PPC  1D58F694
nsXULKeyListenerImpl::GetKeyBindingDocument(nsCAutoString&, nsIDOMXULDocument**)+
8F694
  09E572B0    PPC  1D5900E4  nsXULKeyListenerImpl::LoadKeyBindingDocument(nsIURI*
, nsIDOMXULDocument**)+900E4
  09E56C20    PPC  1D539F44  nsXULDocument::PrepareStyleSheets(nsIURI*)+39F44
  09E56BA0    PPC  1D708DBC  nsComponentManager::CreateInstance(const nsID&,
nsISupports*, const nsID&, void**)+00060
  09E56B50    PPC  1D723DFC  nsComponentManagerImpl::CreateInstance(const nsID&,
nsISupports*, const nsID&, void**)+000A0
  09E56B00    PPC  1BD44F3C  nsLayoutFactory::CreateInstance(nsISupports*, const
nsID&, void**)+44F3C
  09E56A80    PPC  1BBA093C  NS_NewHTMLStyleSheet(nsIHTMLStyleSheet**)+A093C
  09E56A30    PPC  1BB9DF40  HTMLStyleSheetImpl::HTMLStyleSheetImpl()+9DF40
  09E569E0    PPC  1D709CE8  nsHashtable::nsHashtable(unsigned int, int)+0003C
  09E569A0    PPC  1F4B22F8  PL_NewHashTable+000C0
  09E56950    PPC  1D7099C8  _hashAllocTable(void*, unsigned long)+00014
  09E56910    PPC  1F4CA668  PR_Malloc+00014
  09E568D0    PPC  1F537454  malloc+00088

In fact, GetKeyBindingDocument() can be called multiple times per keypress,
because it is called for each window in the hierarchy.
Yeah, I knew about this.  We need to cache the miss.
Whiteboard: [PDT+]
Putting on PDT+ radar.
Status: NEW → ASSIGNED
Whiteboard: [PDT+] → [PDT+] 12/10
Assignee: saari → hyatt
Status: ASSIGNED → NEW
How slow is slow? Well...
	I have a 233Mhz G3 Mac and you can definitely notice the lag. It is very obvious when
compared to a 12/8 build on the same machine.
	Now these aren't fair comparisons because of varying clock speeds but just for reference's sake: On my WinNT 450Mhz P2 it
is unoticable but on my P133 linux box it it VERY obvious such that even the slowest typer would be affected. That's not at all
scientific but it should give one some sort of measuring stick.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Fixed.
Status: RESOLVED → VERIFIED
yeah it is. VERIFIED fixed with 1999121308 builds.
Status: VERIFIED → REOPENED
reopening per comments from editor meeting; pressing backspace repeatedly is
slow as are pressing the arrow keys.  (Others may add other particular items
that appear to be slow.)
Resolution: FIXED → ---
Summary: [Dogfood]Typing in composer is very slow (keybindings issue) → [Dogfood]Typing is very slow (key event handling is slow)
Whiteboard: [PDT+] 12/10 → [PDT+]
updating summary
Assignee: hyatt → trudelle
Status: REOPENED → NEW
reassigning to trudelle per beppe
The symptom you describe is outlined in 21886, a bug I filed against
myself earlier.  I could close this and we could use that one, or I could
keep this open... whichever is easier...
*** Bug 21886 has been marked as a duplicate of this bug. ***
Assignee: trudelle → hyatt
Priority: P3 → P2
Target Milestone: M13
let's keep this one, since it is on PDT radar (don't see why it is PDT+ though,
today's build can keep up with fast typing on a slow Mac).  reassigning to hyatt
as p2 for m13
Today's build on a fast Linux box can keep up with typing, but gets way behind
when holding down the backspace key or cursor motion keys.
Status: NEW → ASSIGNED
Whiteboard: [PDT+] → [PDT+] Expected Fix Date: 1/14/00
OS: Mac System 8.5 → All
Changing OS to all; it's very slow on linux, too.
Whiteboard: [PDT+] Expected Fix Date: 1/14/00 → [PDT-]
Speed on linux is now much faster for typing and deletion.  Changing to PDT-,

but it should probably be removed from dogfood by sfraser (if he agrees).
Status: ASSIGNED → RESOLVED
Closed: 25 years ago25 years ago
Resolution: --- → DUPLICATE
Dup

*** This bug has been marked as a duplicate of 21885 ***
Status: RESOLVED → VERIFIED
OK VERIFIED Dupe. I do note however that this bug has a Target fix of M13 whereas the
other is M14.
Blocks: 24206
No longer blocks: 24206
You need to log in before you can comment on or make changes to this bug.