I'm Developing a JavaFX Application :
In here, I want the Left Pane to have a Blur Background Effect, i.e, when ever the user scrolls the map, the Content Behind the Left Pane Changes, and i want to Use That Content(Blurred), as the Background of the left Pane. & i've almost done it.
Whenever I scroll the Map, it does work, and content Behind gets updated, but In the System Monitor i can see the CPU usage, Temperature and Overall Power Usage Drastically Rises.
To achieve the Frost Glass Effect, I've Added a Event Listener(for detecting mouse move) to the webEngine(Contains the Map) :
Document doc = webEngine.getDocument();
((EventTarget) doc).addEventListener("mousemove", listener, false);
Listener Executes a Method Which :
Retrieves the Actual Content Beneath the Left Pane(Map).
Blur's the Image.
Updates the Screen
To Update the Screen, the Method removes, the Left Pane(VBox) and the Previous Image(Which was The Background). & then again First Add's the Blurred Image Pane and Then the Left Pane to the Root Pane.
So, I think the reason I'm having Performance Issues with this is because, it has to very rapidly remove and Add Panes(Left Pane and Background Image), to the Root Pane, while the user is dragging the Map.
Problem : Very High CPU Usage
So, Is there any other Approach in JavaFX, Wherein it does not require, such high CPU Usage ?
Something Like, which doesn't require removing and Adding Panes all the time.