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

Bug 321683

Summary: [Performance] RefreshJob interacts badly with periodic notification for large project
Product: [Eclipse Project] Platform Reporter: James Blackburn <jamesblackburn+eclipse>
Component: ResourcesAssignee: Platform-Resources-Inbox <platform-resources-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: loskutov, yevshif
Version: 3.6   
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard: stalebug
Attachments:
Description Flags
large_project.tar.bz2 none

Description James Blackburn CLA 2010-08-04 04:57:35 EDT
Created attachment 175820 [details]
large_project.tar.bz2

I saw an interesting performance issue, with resource delta iteration during a periodic resource change notification, while a large project was being asynchronously refreshed.  Bug 245008 comment 41

There was a lot of CPU usage during the project import, and, every time I interrupted the runtime Eclipse, I saw that the NotifyJob thread was iterating in RefreshJob#addRequest and the RefreshJob#fRequests list had grown to 73k items. 

A CDT resource delta listener was iterating over the resource change event, calling IContainer#members() which resulted in a lot of time checking whether the path, or a parent of it, was already in the fRequests list:

iterating over the delta calling IFolder#members() =>
 RefreshJob.addRequest(IResource) line: 67
 RefreshJob.refresh(IResource) line: 141
 RefreshManager.refresh(IResource) line: 86
 Folder(Container).members(int) line: 268
 ...

This can be reproduce by importing the attached project into a CDT (as CDT has a listener which iterates over the delta).
Comment 1 Eclipse Webmaster CLA 2019-09-06 16:14:42 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.
Comment 2 Eclipse Genie CLA 2022-02-01 12:11:06 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 3 Andrey Loskutov CLA 2022-02-04 04:35:31 EST
Most likely duplicate of bug 578487.

*** This bug has been marked as a duplicate of bug 578487 ***