JDK-8099445 : Scene@MouseHandler.pick() is not efficient
  • Type: Enhancement
  • Component: javafx
  • Sub-Component: graphics
  • Priority: P3
  • Status: Resolved
  • Resolution: Won't Fix
  • Submitted: 2009-08-01
  • Updated: 2015-06-16
  • Resolved: 2012-07-30
Related Reports
Blocks :  
Duplicate :  
Relates :  
Description
Implementation relies on Node.contains() method that might be very time consuming (see RT-5278 and RT-5279 for example).
And pick() is actually called on each pulse. 

We should not be doing more than needed.

In particular it has no sense to check whether point is in the node if the following is true:
   a) Node has no childs (e.g. text nodes never have any childs)
   b) Node itself is not interested in any mouse updates

This may significantly improve performance. 
E.g. solving this in addition to fix for Rt-5278 improves fps for transformed text testcase from RT-5278 from 2 to 250.

Comments
This is an old issue that is no longer relevant.
30-07-2012

Chien, can you please close this out? Its out of this release for now.
07-06-2011

Need to reevaluate this for presidio
25-02-2011

No compiler resources for soma.
10-02-2010

The original fix for this issue was backed out because it caused a regression, RT-5414. I am reopening this bug.
03-12-2009

details: http://jfxsrc.sfbay.sun.com/javafx/soma/scrum/graphics/tests/rev/221d8bb860ba changeset: 306:221d8bb860ba user: tdv <dmitri.trembovetski@sun.com> date: Mon Aug 10 10:46:11 2009 -0700 description: Additional changes for RT-5280: always pick SwingComponents details: http://jfxsrc.sfbay.sun.com/javafx/soma/scrum/graphics/runtime/rev/9e5dc4568206 changeset: 3368:9e5dc4568206 user: tdv <dmitri.trembovetski@sun.com> date: Mon Aug 10 10:45:20 2009 -0700 description: Additional changes for RT-5280: always pick SwingComponents
10-08-2009

First build with these changes: http://getjfx.sfbay.sun.com/hudson/job/soma-graphics-scrum/152/
04-08-2009

additional change was required for mobile build failure: changeset 7db074ba3dc4 in http://jfxsrc.sfbay.sun.com/javafx/soma/scrum/graphics/mobile details: http://jfxsrc.sfbay.sun.com/javafx/soma/scrum/graphics/mobile/rev/7db074ba3dc4 Summary: Fix for mobile build failure caused by the fix for RT-5280
04-08-2009

Fixed in soma graphics scrum repo: details: http://jfxsrc.sfbay.sun.com/javafx/soma/scrum/graphics/runtime/rev/7b56b9324fe4 changeset: 3346:7b56b9324fe4 user: tdv <dmitri.trembovetski@sun.com> date: Tue Aug 04 10:09:05 2009 -0700 description: Fixed RT-5280: Scene@MouseHandler.pick() is not efficient details: http://jfxsrc.sfbay.sun.com/javafx/soma/scrum/graphics/tests/rev/bf2d26a419dd changeset: 304:bf2d26a419dd user: tdv <dmitri.trembovetski@sun.com> date: Tue Aug 04 10:10:49 2009 -0700 description: Fixed RT-5280: Scene@MouseHandler.pick() is not efficient
04-08-2009

With this fix the TextLayout test from RT-5100 improved from 0.5 fps to 20fps.
04-08-2009

webrev updated. The following cases needed to be handled properly: - we can't skip picking if the node has a mouse listener anywhere up in the hierarchy - also can't skip if blocksMouse is set - we have to check for containment. If it's a group though we don't have to pick children unless there are listeners in the hierarchy
04-08-2009

Webrev is out: http://javaweb.sfbay/~tdv/webrevs/soma/RT-5280
03-08-2009