-
Enhancement
-
Resolution: Won't Fix
-
P4
-
7
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2181707 | 6u18 | Anthony Petrov | P3 | Closed | Won't Fix |
Applications that use the HW/LW Mixing feature should validate their component hierarchies (see 6868255 for details).
Every operation changing layout-related information (e.g. setBounds(), setVisible(), setFont(), etc.) invalidates the component hierarchy. However, the current implemetnation of the hw/lw mixing also triggers the mixing code when such operations occur.
If invalidation of the hierarchy happens before calling the mixing code, then the mixing code will immediately return, spending, however, some time figuring out if the mixing is really needed to be performed or not.
If invalidation happens after calling the mixing code, then the shapes of components will be anyway recalculated again when validation of the hierarchy happens. If they appear to be equal to what's been calculated when, say, the setBounds() method was invoked, nothing will happen. Otherwise, the updated shape will be re-installed to the component.
One may notice that in both cases there's code that gets executed but either results in almost no-op, or recalculates the shapes once more time anyway.
Thus, eliminating the unnecessary code we can improve the performance of GUI applications.
Every operation changing layout-related information (e.g. setBounds(), setVisible(), setFont(), etc.) invalidates the component hierarchy. However, the current implemetnation of the hw/lw mixing also triggers the mixing code when such operations occur.
If invalidation of the hierarchy happens before calling the mixing code, then the mixing code will immediately return, spending, however, some time figuring out if the mixing is really needed to be performed or not.
If invalidation happens after calling the mixing code, then the shapes of components will be anyway recalculated again when validation of the hierarchy happens. If they appear to be equal to what's been calculated when, say, the setBounds() method was invoked, nothing will happen. Otherwise, the updated shape will be re-installed to the component.
One may notice that in both cases there's code that gets executed but either results in almost no-op, or recalculates the shapes once more time anyway.
Thus, eliminating the unnecessary code we can improve the performance of GUI applications.
- backported by
-
JDK-2181707 Performance optimization of the HW/LW Mixing
- Closed
- relates to
-
JDK-6868255 Requirements for correct operating of the HW/LW Mixing feature need to be specified
- Resolved
-
JDK-6778882 InternalFrame within glass pane goes below a heavy weight component
- Closed
-
JDK-6826074 JScrollPane does not revalidate the component hierarchy after scrolling
- Closed
-
JDK-4993545 NativeInLightFixer adds asynchronousity
- Closed
-
JDK-6852592 invalidate() must be smarter
- Resolved
(1 relates to)