Bug 376595 - Performance - Validation time could be cut 50% if we cache java text ranges
Summary: Performance - Validation time could be cut 50% if we cache java text ranges
Status: RESOLVED FIXED
Alias: None
Product: Dali JPA Tools
Classification: WebTools
Component: JPA (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: 3.3 M2   Edit
Assignee: Karen Butzke CLA
QA Contact:
URL:
Whiteboard:
Keywords: api
Depends on:
Blocks:
 
Reported: 2012-04-12 09:51 EDT by Karen Butzke CLA
Modified: 2012-09-06 11:40 EDT (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 Karen Butzke CLA 2012-04-12 09:51:21 EDT
When validating a project with all java entities, 30-60% of the time in validation is spent building the ASTRoot for each java type in AbstractJavaPersistentType.validate(List<IMessage>, IReporter). That ASTRoot is only used for calculating text ranges. If we make the change to cache text ranges in the java resource model we could improve validation time drastically.

Would also have the added benefit of simplifying API since it would make the java and orm validation api the same.
Comment 1 Karen Butzke CLA 2012-09-06 11:40:49 EDT
There were multiple commits involved in this bug and quite a few provisional API changes. Many Java and Orm interfaces were deleted. The validation and completion proposal methods were changed. Now there is provisional API on JpaContextNode for getValidationTextRange(), validate(List<IMessage>, IReporter>), and getCompletionProposals(int). See the following commits for details and the new help for old friends document.

http://git.eclipse.org/c/dali/webtools.dali.git/commit/?id=a420fb18c36c264ec6b29b2c3fd1f77a6a9f54a9 - caching text ranges in JAXB resource model

http://git.eclipse.org/c/dali/webtools.dali.git/commit/?id=0c48289ad0c3a335b93ecf3da8e17f96121e0247 - stop building CompilationUnit for validation, removed CompilationUnit parameter from validation methods

http://git.eclipse.org/c/dali/webtools.dali.git/commit/?id=f58571464a578bec1cd744d569f975a66b460abb - refactored completion proposal methods to be identical in java and orm

http://git.eclipse.org/c/dali/webtools.dali.git/commit/?id=8ff91ca2965145b716ae25d6030ddd42613dfde2 - deleted JavaJpaContextNode and XmlContextNode

http://git.eclipse.org/c/dali/webtools.dali.git/commit/?id=37ab5884977fa7df0a3c86177a36cae41f6fe1a9 - deleted many Java and Orm interfaces that are no longer needed

http://git.eclipse.org/c/dali/webtools.dali.git/commit/?id=d1074325f2fb45d2d996ca555f40b09533a11d30 - fixed Java code completion filtering