| Summary: | Slow typing in big php files – LineStyleProviderForPhp performance optimization | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Natalia Bartol <natalia.bartol> | ||||||||||
| Component: | PDT | Assignee: | Natalia Bartol <natalia.bartol> | ||||||||||
| Status: | CLOSED FIXED | QA Contact: | |||||||||||
| Severity: | normal | ||||||||||||
| Priority: | P3 | CC: | jacek.pospychala, silviya | ||||||||||
| Version: | unspecified | ||||||||||||
| Target Milestone: | --- | ||||||||||||
| Hardware: | PC | ||||||||||||
| OS: | Windows 7 | ||||||||||||
| Whiteboard: | |||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Natalia Bartol
Created attachment 209671 [details]
Creating text presentation for php script region improved
Attached patch modifies the creation of text presentation for a php script region that has not been fully reparsed. Created presentation covers now only affected php tokens, what gives performance boost when typing.
Affected classes:
IPhpScriptRegion – methods added to get recently updated tokens
PhpScriptRegion – methods added to get recently updated tokens. Synchronization on phpTokens added in updateRegion method to avoid concurrent modification exception when the reconciling background thread calls phpTokens.getToken()
PhpTokenContainer – synchronized keyword added to few methods to avoid concurrent modification exception
PHPStructuredTextViewer – removed line region.setFullReparsed(true); as information that region is not fully reparsed is required in LineStyleProviderForPhp
PHPStructuredPresentationReconciler – modified creation of text presentation for damaged php script region that is not fully reparsed
StructuredDocumentDamagerRepairer – method returning presentation added which covers only updated php tokens in case when the damage covers whole PHP region and this regions has not been fully reparsed
LineStyleProviderForPhp – using only updated php tokens when creating line styles
Created attachment 209682 [details]
Creating text presentation for php script region improved II
One more improvement in creating text presentation for updated php region. Deals with the case where damaged typed region is smaller than corresponding php script region.
Created attachment 209696 [details]
Creating text presentation for php script region improved III
A bug fixed in created text presentation range.
Created attachment 209744 [details]
Creating text presentation for php script region improved IV
Patch improved: more efficient way of creating text presentation in StructuredDocumentDamageRepairer.
fixed by Natalia great work! Verified. Closing Ilina Stefanova |