Skip to content
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

Reduce the number of graph traversal for the different services #50

Open
flongo opened this issue Nov 20, 2013 · 1 comment
Open

Reduce the number of graph traversal for the different services #50

flongo opened this issue Nov 20, 2013 · 1 comment

Comments

@flongo
Copy link
Collaborator

flongo commented Nov 20, 2013

Once the graph has been produced by the parser, each service traverses it in order to extrapolate the information that are needed. For example, both the highlight and validate methods in Mode class perform the traversal.

This approach is not very efficient performance-wise. The suggestion is to have a unique method that performs a traversal and extrapolate different information according to the list of required services.

@ghost ghost assigned flongo Nov 22, 2013
flongo added a commit to flongo/editor-backend that referenced this issue Dec 2, 2013
Mode
- creation of the multiservice method
- conversion of the "validate" method to the new pattern

Code
- creation of a cache mechanism that prevents the execution of a service in case it has been executed on the same source code
- handling of the case in which the source code is an empty string

Validation visitor
- code to perform the validation of the graph with the extractioon of errors and warnings has been moved to this dedicated class

Partial fix of issue ariatemplates#50
flongo added a commit to flongo/editor-backend that referenced this issue Dec 2, 2013
Mode
- creation of the multiservice method
- conversion of the "validate" method to the new pattern

Code
- creation of a cache mechanism that prevents the execution of a service in case it has been executed on the same source code

Validation visitor
- code to perform the validation of the graph with the extraction of errors and warnings has been moved to this dedicated class

Partial fix of issue ariatemplates#50
flongo added a commit to flongo/editor-backend that referenced this issue Dec 2, 2013
Mode
- creation of the multiservice method
- conversion of the "validate" method to the new pattern

Code
- creation of a cache mechanism that prevents the execution of a service in case it has been executed on the same source code

Validation visitor
- code to perform the validation of the graph with the extraction of errors and warnings has been moved to this dedicated class

Partial fix of issue ariatemplates#50
flongo added a commit to flongo/editor-backend that referenced this issue Dec 2, 2013
Mode
- creation of the multiservice method
- conversion of the "validate" method to the new pattern

Code
- creation of a cache mechanism that prevents the execution of a service in case it has been executed on the same source code

Validation visitor
- code to perform the validation of the graph with the extraction of errors and warnings has been moved to this dedicated class

Partial fix of issue ariatemplates#50
flongo added a commit that referenced this issue Dec 3, 2013
Mode
- creation of the multiservice method
- conversion of the "validate" method to the new pattern

Code
- creation of a cache mechanism that prevents the execution of a service in case it has been executed on the same source code

Validation visitor
- code to perform the validation of the graph with the extraction of errors and warnings has been moved to this dedicated class

Partial fix of issue #50
@flongo
Copy link
Collaborator Author

flongo commented Jan 9, 2014

The first commit that has introduced the possibility of adding visitors in a unique graph traversal is ba57366. The same commit also implements a visitor for the validation service.

Other services remain to be migrated.

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