New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AADL resources which reference contributed properties are rebuilt needlessly #1145

Closed
philip-alldredge opened this Issue Apr 17, 2018 · 6 comments

Comments

Projects
None yet
2 participants
@philip-alldredge
Collaborator

philip-alldredge commented Apr 17, 2018

Summary

Xtext is rebuilding all open AADL resources which reference a contributed property set whenever any file in the workspace is changed. This was observed while debugging an issue with the graphical editor but the issue is not believed to be caused by the graphical editor.

With smaller workspaces, this is not likely to cause many issues. However, with larger workspaces, it can cause performance issues if many editors are open. It is troublesome for the graphical editor because moving a shape and saving results in rebuilding the Xtext resource.

Expected and Current Behavior

It is expected when a non-AADL resource changed in the workspace is changed, then it would not trigger any change to the AADL resources.

The current behavior is that when any change occurs in the workspace, document change notifications are sent for all AADL Xtext editors which have an Xtext document that references a contributed property set.

NOTE: Disabling the addition of contributed resources to "toBeBuilt" in PropertiesToBeBuiltComputerContribution causes the resource not to be built. Should there be a check to only build if the contributed resources have changed? Is such a change possible?

Steps to Reproduce

Even though it does not appear to be caused by the graphical editor, it is easier to notice with the graphical editor. However, is can also be noticed using the Progress view in OSATE.

  1. (Optional). Add a print statement inside of org.osate.ge.internal.ui.xtext.OpenAadlResources.createModelListener which prints the changed resource. System.err.println("CHANGED: " + openResource.uri);
  2. Create an AADL Project
  3. Create a simple AADL package which references a contributed property set.
  4. Open it in the text editor.
  5. Open the Progress view in OSATE.
  6. Make a change and save any file in the workspace. For example changing a file named "README.txt".
  7. The model listener created by org.osate.ge.internal.ui.xtext.OpenAadlResources.createModelListener is called. The Progress view will briefly show that it is rebuilding the workspace. An AUTO_BUILD is likely expected but rebuilding individual resources is not expected.

Example AADL package.

package test
public
	with ARINC653;
	system top
	end top;

	system implementation top.impl
	end top.impl;
end test;

Environment

  • Platform: Windows 10.
@lwrage

This comment has been minimized.

Show comment
Hide comment
@lwrage

lwrage Apr 18, 2018

Contributor

@philip-alldredge FYI: Xtext logs which files are built in the Xtext console if it's open.

Contributor

lwrage commented Apr 18, 2018

@philip-alldredge FYI: Xtext logs which files are built in the Xtext console if it's open.

@lwrage

This comment has been minimized.

Show comment
Hide comment
@lwrage

lwrage Apr 18, 2018

Contributor

We will look at performance improvements in the scalability task.

Contributor

lwrage commented Apr 18, 2018

We will look at performance improvements in the scalability task.

@lwrage

This comment has been minimized.

Show comment
Hide comment
@lwrage

lwrage Apr 19, 2018

Contributor

I cannot reproduce this. I see the following, instead:
Whenever a modified files (form projects P and Q, say) are saved, a workspace build is triggered. During the build of projects P and Q, the contributed AADL files are processed but not when other projects in the workspace are being built.
This is not optimal. As the contributed files haven't changed, they should only be processed during a full build.

Contributor

lwrage commented Apr 19, 2018

I cannot reproduce this. I see the following, instead:
Whenever a modified files (form projects P and Q, say) are saved, a workspace build is triggered. During the build of projects P and Q, the contributed AADL files are processed but not when other projects in the workspace are being built.
This is not optimal. As the contributed files haven't changed, they should only be processed during a full build.

@philip-alldredge

This comment has been minimized.

Show comment
Hide comment
@philip-alldredge

philip-alldredge Apr 20, 2018

Collaborator

As long as I have the AADL file which references such a property open, it occurs anytime a file in an AADL project is changed. If the file is in a non-AADL project, the change notification does not occur.

Collaborator

philip-alldredge commented Apr 20, 2018

As long as I have the AADL file which references such a property open, it occurs anytime a file in an AADL project is changed. If the file is in a non-AADL project, the change notification does not occur.

@lwrage

This comment has been minimized.

Show comment
Hide comment
@lwrage

lwrage Apr 20, 2018

Contributor

I guess rebuilding of the open files happens because the the contributed property sets they depend on have been rebuilt. Turning off that build may solve the whole issue.

Contributor

lwrage commented Apr 20, 2018

I guess rebuilding of the open files happens because the the contributed property sets they depend on have been rebuilt. Turning off that build may solve the whole issue.

@lwrage lwrage self-assigned this Apr 20, 2018

@philip-alldredge

This comment has been minimized.

Show comment
Hide comment
@philip-alldredge

philip-alldredge Apr 20, 2018

Collaborator

Agreed.

Collaborator

philip-alldredge commented Apr 20, 2018

Agreed.

@lwrage lwrage changed the title from AADL Resources Which Reference Contributed Properties are Rebuilt Needlessly to AADL resources which reference contributed properties are rebuilt needlessly May 31, 2018

@lwrage lwrage added this to the 2.3.4 milestone May 31, 2018

@lwrage lwrage added core backlog next and removed backlog labels May 31, 2018

@wafflebot wafflebot bot added in progress and removed next labels Jun 14, 2018

@wafflebot wafflebot bot added review and removed in progress labels Jun 14, 2018

@wafflebot wafflebot bot removed the review label Jun 22, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment