Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 337316

Summary: Performance issue with text field assists when typing fast
Product: [RT] RAP Reporter: Tillmann Seidel <tseidel>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: 1.5 M5   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 330461    

Description Tillmann Seidel CLA 2011-02-16 09:33:18 EST
Build Identifier: RAP 1.4 M4

Text field assists in RAP have a severe performance problem. When typing fast, the rendering of the characters typed slows down significantly after a few keystrokes.

Reproducible: Always

Steps to Reproduce:
1. Create a text field.
2. Create an IContentProposalProvider which always returns an empty array of proposals
3. Create a ContentProposalAdapter for the text, the IContentProposalProvider and the default TextContentAdapter
4. Enter text into the text field very quickly (e.g. keep your finger on a key)

After a dozen of characters, the rendering of the characters slows down significantly.
Comment 1 Ivan Furnadjiev CLA 2011-02-18 09:51:28 EST
ContentProposalAdapter is heavy use of key events. When you create a ContentProposalAdapter, a key event listener is attached to the text widget. For every key press on the client a new request is send (immediately or after a delay) to the server. The issue with the bad performance is related to these bunch of requests, but this is a known limitation of the key events. The fix is to rewrite (if possible) the ContentProposalAdapter to not use of key events, but modify events only.
Comment 2 Ivan Furnadjiev CLA 2012-04-09 06:49:50 EDT
I think that this issue has been fix with the bug 367871. DOM key events are not canceled automatically anymore and re-fired again after getting the result from the doit flag. Please reopen if the issue persists with RAP > 1.5M5.