Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 358509 - Better re-compile strategy when compiler setting changes
Summary: Better re-compile strategy when compiler setting changes
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-22 01:12 EDT by Tony Chen CLA
Modified: 2017-02-23 14:16 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tony Chen CLA 2011-09-22 01:12:23 EDT
When compiler setting (workspace preference or project property) changes, affected resource will be rebuild or regenerate. In some situations, we took a lazy approach to rebuild the entire project instead of rebuild exactly the resources which need rebuild. It can be improved to get better performance. 

Here's what we do now and what can be improved

- Change default compiler in preference
  Will cause a rebuild of all projects which does not have project specific compiler setting. The EDT Advanced Builder is going to recompile the entire project, so all the new IRs will be included in the delta given to the generation builder.

- Enable/Disable a generator in preference, Change a generator setting (output directory, argument)
  Regenerate project which does not have project specific compiler setting
  Regenerate project which has project specific setting, but does not override generation setting

  <TODO 1> this next check is still incomplete. We need to also verify that the modified gen settings were for the default compiler. If you change a non-default compiler's settings, we should not regenerate!

  <TODO 2> right now we regenerate the entire project, but that hurts performance. It could be that some packages or files are overriding the workspace generation settings. These files would not need to be regenerated. A full solution would be to walk the source folders in the project and touch all IRs that correspond to .egl files that do not override the generation settings. ProjectSettingsListenerManager.GeneratorPreferenceListener for how to do this.

- Change compiler setting for a resource (project, package, file etc)
  Regenerate the resources for which setting is changed. See ProjectSettingsListenerManager


<TODO 1> & <TODO 2> should be a future performance enhancement.