Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8090492

Mouse event post-processing may do unnecessary work

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P3 P3
    • tbd
    • 8
    • javafx

      Consider the following scenario:
      1. Mouse is in the window and Scene.lastEvent is MOUSE_MOVED
      2. ScenePulseListener.pulse() starts
      3. Application asynchronously (from a different thread) wants to update the scene graph and
      schedules the update work with invokeLater().
      4. ScenePulseListener.pulse() calls mouseHandler.pulse() and schedules post-processing
      Scene.lastEvent with Platform.runLater(pickProcess).
      5. ScenePulseListener.pulse() finishes.
      6. Application update task is invoked. It updates the scene graph and effectively invalidates
      many or all node bounds computed during the previous pulse.
      7. pickProcess task to post-process lastEvent is invoked. It has to recompute node bounds,
      which may take significant time (~100ms in the test at hand). Moreover, that post-processing
      is done on a configuration which is different from that of the last pulse.

      It is deemed that pickProcess is invoked inappropriately late thus causing delay in mouse
      event postprocessing, possibly incrorrect result, delays in further input event delivery.

            Unassigned Unassigned
            omazurov Oleg Mazurov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Imported: