| Summary: | Model Updates should be smother with while (!display.readAndDispatch()); | ||
|---|---|---|---|
| Product: | [Eclipse Project] e4 | Reporter: | Lars Vogel <Lars.Vogel> |
| Component: | UI | Assignee: | Project Inbox <e4.ui-inbox> |
| Status: | RESOLVED INVALID | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | Lars.Vogel |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
Closing this bug, as my own example code is buggy. |
I'm not sure if this is a real bug or an error I'm doing. I want to update the model via code and the change should be applied immediately. I use display.readAndDispatch() for this. I believe the following two version are the same but the first version runs much, much faster. Perhaps this is a performance bug? ---------Slow------------------ int initialHeight = window.getHeight(); int initialWidth = window.getWidth(); for (int i = initialHeight; i >= untilValue; i--) { while (display.readAndDispatch()) ; window.setHeight(i); wait10(); } -------------------------------- -------Fast--------------------- int initialHeight = window.getHeight(); int initialWidth = window.getWidth(); for (int i = initialHeight; i >= untilValue; i--) { while (!display.readAndDispatch()){ window.setHeight(i); wait10(); } } -------------------------------- I would assume that both ways should result in the same performance. Please correct me if I'm wrong.