First Profiling

0 views
Skip to first unread message

kohlerm

unread,
Mar 5, 2009, 3:12:53 PM3/5/09
to TweetBox
Hi,
I did a first profiling session with the Netbeans Profiler and it
seems that the frequent use of "bind" might cause the slow scrolling.
It might a different Profiler later.

In Scrollbar.fx there are several uses of bind to update values
internally (I guess, I've no clue about JavaFX). I think this could be
replaced by simple function calls.

Regards,
Markus

mark.n...@gmail.com

unread,
Mar 5, 2009, 5:25:36 PM3/5/09
to TweetBox
"bind" is a JavaFX operator that you use to bind the value of a
variable to the value of another.
for example: var a = bind b. if b changes, so does a.
This is called data binding and is an essential aspect of rich
internet applications.
And yes, data binding is expensive. I try to keep it to a minimum. I
guess that would be a good "best practice" Michael Heinrich could add
on his blog.

I am currently working on a simple listbox component that should
perform better that the generic scrollview component (which I also
made).
The scrollview keeps all its contents in the scene graph, no matter if
only part of it is actually visible. I suspect that that is causing
much of the sluggishness.
The listbox is going to be a lot more economic with the scene graph.
It will only hold the nodes that it can actually show. This would take
a lot of load from the scene graph rendering engine (less
recalculations of node dimensions, and less redraws).

I haven't quite finished the listbox yet, but I'm getting close.

kohlerm

unread,
Mar 6, 2009, 3:50:38 AM3/6/09
to TweetBox
Hi,
Yes. Binding is similar to Flex. That is what I expected.
It's just that because of JavaFX generating classes it's not really
obvious in the profiler what is going on :(

I also did a heap dump and the object graph is a kind of mess. There
seems to "hang around" a lot of objects because of the binding
mechanism.

I need to take a closer look at this.

Regards,
Markus

On Mar 5, 11:25 pm, "mark.nank...@gmail.com" <mark.nank...@gmail.com>
wrote:
Reply all
Reply to author
Forward
0 new messages