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

Bug 314618

Summary: Unresolved reference performance problem
Product: [Modeling] TMF Reporter: Ed Willink <ed>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: sebastian.zarnekow
Version: 1.0.0Flags: sebastian.zarnekow: helios+
Target Milestone: SR1   
Hardware: PC   
OS: Windows Vista   
Whiteboard:

Description Ed Willink CLA 2010-05-27 04:45:17 EDT
[This is issue is distinct from but interacts very badly with Bug 283710].

If an Xtext document has a stupid but serious error like a bad import, there may be many thousands of proxy links that cannot be resolved. Resolution of these links may occur many times as different colouring/folding/outline algorithms are attempted and some of these failures fill the Error Log rather rapidly.

I find that I can considerably reduce the impact by maintaining a modificationCount in a derived XtextDocument.modify() and caching that count with each resolution failure. A repeated resolution at the same modificationCount  can then be terminated promptly. If I can do this by tweaking a derived XtextDocument, I suspect you can do it much better in the LinkingService.
Comment 1 Sebastian Zarnekow CLA 2010-06-25 11:41:27 EDT
Sounds reasonable to me. The OnChangeEvictingCache may keep track of unresolveable proxies.
Comment 2 Sebastian Zarnekow CLA 2010-07-21 14:35:04 EDT
Fixed in HEAD.
Comment 3 Karsten Thoms CLA 2017-09-19 16:40:39 EDT
Closing bug which were set to RESOLVED before Eclipse Neon.0.