Changes between Version 2 and Version 3 of NFR_PREVIEW_PERFORMANCE_R0


Ignore:
Timestamp:
10/28/09 19:13:14 (15 years ago)
Author:
kyli
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • NFR_PREVIEW_PERFORMANCE_R0

    v2 v3  
    3232 
    3333= Design = 
    34 ^(Describe your design here.)^ 
     34 * '''TimelinesPalette'''. This palette re-draws very slowly. There are 2 issues there: first, the default zoom is 1ms, so the timeline is too large. Second, the activation channel is drawn pixel by pixel, which makes thousands of iterations every time something is changed. The first thing to do there is to remove abilities to select such a zoom - I don't think it's needed, since you have to scroll several screens in order to see the timeline. So, the first 3 entries will be removed and default will be 500ms. Second, take the getOptions() call out of the loop which draws the activation channel, it is the slowest part of the drawing.  
     35 * '''HeadTextFrameView'''. This one contains textLayout() - a prop, which is recomputed when time changes or when something in the page is moved. The result is making a new HotLayout - a very slow operation.  
     36  * Put a simple 'if' in this prop - if the text and the areas are the same, return the last layout. This makes sense in preview mode, when we have no changing locations and resizing frames. 
     37  * Change getChainedFrames to chainedFrames() - autoprop. This method searches through all the frameViews in the current book, so a bigger book will be faster with prop. 
     38  * In getAreas() every HeadTextFrame calculates the wrapped areas of all the frames from the chain.  This can be potentially optimized if every text frame calculates its wrapped area, and the text just gets the needed information. So, move the calculations in AutoProp. 
     39 * '''BookView'''. Create autoProp currentPage(), which holds the resourceref of the current page. All the methods which depend on the timestate().getcurrentPageView() should use this. BookView.setTime() sets a new value of timeState(). So, depending on it when interested only in the current page is useless.  
     40 * '''ElementView'''. It has a sceneElement(), which has setupElements(). It depends on the current time, but the only thing it's interested in is the visibility and activity. Make props isVisible() and isOn(), which recompute these things. sceneElement should depend on the props, so it will re-setup only when it hides/shows/deactivates/actuivates. 
     41 * '''FrameView'''. Create a prop which computes the location of the frame in BoundMode.CONTENT. Also, make a method which uses the computed value to return the top left point in some different bound mode. Then, make computeLocalRect() and setupSceneDynamic() use it. The results are good :) 
     42 * '''ScenePageLogic'''. In the selection logic, put a simple check "!pwa.getSel().getSelected().equals(toSelect)" before the last line which performs the selection. The resultcan be demonstrated when you make a selection rectangle which covers a frame. Without this line, it selects again and again the frame on every move, with it it only makes some checks and does not select anything. Quite faster. 
     43 * '''ListPalette'''. This one has a prop items(), which is a listProp. When something is changed it depends on, it recomputes. But if the newly computed listProp has more than 2 different elements, it fires events that all the elements are removed 1 by 1, then the new elements are added again 1 by 1. The JList's setup method which tracks this prop, recieves n*n signals to recompute. Its setup method iterates through all the items and does some stuff. So, when you switch from a book with 100 pages to another one with 100 pages, the JList of the pagePreviewPalette makes 10K iterations. AllResourcesPalette does even more if the pages are not empty. So, replace the listProp items() with Prop<ImmList<ListPaletteItem>> and do so for every derivative.  
     44 *'''PwaSelector'''. It has a listprop called lastSelected(). It's private, but there are public methods which use it. For example, getSelected(). And so, all the haloMenus depend on this list Prop, which just like in the list palette, fires lots of changes. Replace it also with a prop<ImmList<ElementView>>. The result may best be visualized when you have lots of frames, select them all and then click on the page in order to deselect them.  
     45 
     46The branch is in branches/private/kyli/myBranch. 
     47 
    3548 
    3649= Implementation =