Bug 551676 - Updating dynamic Java working sets even though I do not have any
Summary: Updating dynamic Java working sets even though I do not have any
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.8   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.16 M3   Edit
Assignee: Andrey Loskutov CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
: 551152 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-10-01 10:02 EDT by Lars Vogel CLA
Modified: 2020-04-19 17:02 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Vogel CLA 2019-10-01 10:02:06 EDT
I frequently see the message "Updating dynamic Java working sets" after a startup but I never created or used them. 

Can this update be avoided if the user does not have any dynamic Java working sets?
Comment 1 Andrey Loskutov CLA 2019-10-01 10:25:19 EDT
See linked bug 551152 and bug 521336.

I believe the JDT Tests/Main dynamic working sets are only needed in the context of Search/Problems view to search inside tests/production code only etc. 

I'm also not using this feature (never used) but I constantly feel the pain and see that job running because I have lots of working sets and lots of projects.

Ideally we would set an option in the UI somewhere saying "I don't care about that feature" or to enable that feature *on demand* only.
Comment 2 Till Brychcy CLA 2019-10-01 10:30:32 EDT
You have them, maybe you don't use them - they are the "Java Main Sources" and "Java Test Sources" working sets, which allow filtering in generic platform functionality like the Problems view, but are very useful everywhere where working sets can be used (I often use them in "File Search" and sometimes even the package explorer)

Andrey wanted this message visible for users, but it should rarely be visible, as most work should be done in the background - maybe you experience something like in bug 551152?

(Platform currently has no infrastructure for on-demand updated working sets.)
Comment 3 Till Brychcy CLA 2019-10-01 10:36:48 EDT
(In reply to Till Brychcy from comment #2)
> (Platform currently has no infrastructure for on-demand updated working
> sets.)

BTW. the real performance problem discovered in bug 551152 is that ALL working sets are persisted if a single one changes and that got more expensive because of a module related change - but persisting could be skipped for dynamic working sets and it might be easier to add platform api to avoid that.
Comment 4 Andrey Loskutov CLA 2020-02-29 18:08:09 EST
See bug 558035 comment 23. This feature must be "on demand".
Comment 5 Andrey Loskutov CLA 2020-03-02 04:17:33 EST
See https://git.eclipse.org/r/158650 patch series (WIP, requires  https://git.eclipse.org/r/158649).

I plan to polish the patches once I have more time, this will also solve bug 551152.
Comment 6 Andrey Loskutov CLA 2020-03-02 04:19:05 EST
*** Bug 551152 has been marked as a duplicate of this bug. ***
Comment 7 Till Brychcy CLA 2020-03-02 04:21:16 EST
BTW in bug 558035 comment 24 I found out that the message is shown while the job is running from the POV of the job manager, but is actually waiting to be executed by the ui thread, while other system tasks are being executed by it. This is is misleading, so the updater job should be switched back to back to be a "system" task.
Comment 13 Eclipse Genie CLA 2020-03-31 09:23:08 EDT
New Gerrit change created: https://git.eclipse.org/r/160244
Comment 15 Andrey Loskutov CLA 2020-04-19 17:02:52 EDT
I believe this is fixed now for default startup scenarios, haven't seen this job running anymore recently. 

Still can occasionally occur if there is code that tries to inspect all defined working sets *contents* (CDT code does this). Can't do anything about that.