Performance impact of Focus panel with no handlers?

38 views
Skip to first unread message

darkflame

unread,
Dec 30, 2014, 10:40:15 AM12/30/14
to google-we...@googlegroups.com

I made a game engine that used a lot of focus panels on an absolute panel. - essentially everything on the panel is within a focus panel in case in needs pointer interaction. The absolute panel they are on is bigger then the screen and can move.
umm...was this me being an idiot?

If theres a hundred focus panels with no handlers attached, is that going to be significantly impact on performance?  I could ensure only things that potentially have actions get put into focus panels, but not sure if the development changes will be worth the performance boast.

Any insights?

Jens

unread,
Dec 30, 2014, 11:03:10 AM12/30/14
to google-we...@googlegroups.com
Generally I think they won't really cost you more performance than using a normal panel. FocusPanel just adds a bunch of (delegate) methods you can call and thats it. If your code never calls them then they are likely to be removed by the GWT compiler anyways.

-- J.

Thomas Wrobel

unread,
Dec 30, 2014, 11:18:59 AM12/30/14
to google-we...@googlegroups.com
Ah, thanks. Good to know.
What about all those little hidden <input tags, also negligible?


~~~
Thomas & Bertines online review show:
http://randomreviewshow.com/index.html
Try it! You might even feel ambivalent about it :)

On 30 December 2014 at 17:03, Jens <jens.ne...@gmail.com> wrote:
Generally I think they won't really cost you more performance than using a normal panel. FocusPanel just adds a bunch of (delegate) methods you can call and thats it. If your code never calls them then they are likely to be removed by the GWT compiler anyways.

-- J.

--
You received this message because you are subscribed to a topic in the Google Groups "Google Web Toolkit" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit/Nvy8OOBn8sE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-web-tool...@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Jens

unread,
Dec 30, 2014, 11:41:02 AM12/30/14
to google-we...@googlegroups.com
Ah, thanks. Good to know.
What about all those little hidden <input tags, also negligible?

Hm yeah well that carries some overhead if you don't need access key support for your focus panels. But if you need access key support then it is kind of a requirement in most browsers as you normally can not assign an access key to a div element.

In HTML5 the accesskey property is allowed on any element not just a, button, various inputs. But I don't know how well browsers already support that. But in the future that input hack might go away for HTML5 compliant browsers.

-- J.

darkflame

unread,
Jan 3, 2015, 3:52:04 PM1/3/15
to google-we...@googlegroups.com
Thanks for the info.
I removed them it was pointless having them as I don't need access keys for those elements. I think I got a slight performance boast, but I changed a few things at once so hard to tell definitively.
Still, similar page is probably always good.
Reply all
Reply to author
Forward
0 new messages