kba / lanterna

Automatically exported from code.google.com/p/lanterna
GNU Lesser General Public License v3.0
0 stars 0 forks source link

Too much CPU consumption when there is no Interactable component on the window #116

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I came across this in my app when I was on the window with no interactable 
components. I was using a window to just display the information. cpu 
consumption went up to 50% when I am on this window.

This is happening with version 2.1.8

When I debugged it, I found that below code in showWindow method is setting 
needsRefresh to true when there are no interactable components. I commented 
needsRefresh=true for now.

window.addWindowListener(new WindowAdapter() {
    @Override
    public void onWindowInvalidated(Window window)
    {
        needsRefresh = true; 
    }
});

Original issue reported on code.google.com by venu1...@gmail.com on 22 Aug 2014 at 1:38

GoogleCodeExporter commented 9 years ago
Yep, I can reproduce it

Original comment by mab...@gmail.com on 21 Sep 2014 at 1:55

GoogleCodeExporter commented 9 years ago
I've pushed a fix for this, will be available in the next 2.1.x release

Original comment by mab...@gmail.com on 21 Sep 2014 at 1:55