Version 5 (modified by gogov, 16 years ago) (diff) |
---|
Analysis
Overview
The goal of this task is to do refactoring of the usage of Changes and ChangeManagers (and also respective refactoring in affected code) in order to achieve the following:
- improved ProLib performance,
- preparing the ground for implementing the UndoManager (optionally provide a prototype),
- and optionally, improve and/or fix ProLib tests by the way.
Task requirements
In more detail, the following should be done:
- About ProLib performance:
- improve locating of ChangeManagers for Pros:
- this is expected to give a performance boost overall since currently locating of ChangeManagers for lots of objects is done by iterating through the object's parents list until the ChangeManager of the ResourceSpace the object is associated with is reached and returned. After the refactoring this should take constant time.
- it is also expected to improve some nasty code's readability and correctness.
- some additional constraints should be enforced on the possible relations between ProObjects and Resources in order to achieve this refactoring. List them and take them in consideration when implementing.
- refactor all affected code.
- improve locating of ChangeManagers for Pros:
- About UndoManager:
- proposals on a possible prototype should be designed and created,
- or list and implement improvements which would ease the implementation of the UndoManager in the next revision.
- About tests:
- some ProLib tests should be picked and improved:
- should be fixed if not working,
- should have @SuppressWarnings("all") and similar removed and promptly documented and cleaned up from messy code.
- some ProLib tests should be picked and improved:
Task result
- possibly, performance improvement,
- improved code,
- possibly, UndoManager prototype,
- some improved tests.
Implementation idea
(Provide some rough implementation idea(s).)
Related
How to demo
- Show expected performance optimization or at least some proof this optimizes performance.
- If possible, show the UndoManager prototype.
- If any progress on this, run improved unit tests.
Design
- Each ProObject should be bound to a specific ChangeManager when constructed.
- The ChangeManager responsible for each Pro should:
- either be the DefaultChangeManager, in the cases when Changes to the Pro are not expected to be processed in a special way (like the Aspects Changes or in a testing scenarion),
- or the Pro will be associated directly or indirectly with a ProObject and thus the ProObject's ChangeManager will be responsible for processing the Pro's Changes.
- As a consequence, this would remove the need for attach and detach operations because a given ProObject will reside only in one ResourceSpace and respectively will have only one ChangeManager during its lifetime.
- The ChangeManager responsible for each Pro should:
Implementation
(Describe and link the implementation results here (from the wiki or the repository).)
Testing
(Place the testing results here.)
Comments
(Write comments for this or later revisions here.)