You're creating half a million buttons and each of those requires an object handle. Yes that's going to be slow.
So, the obvious question is Why? What on Earth are you trying to achieve that would realistically require that?
Ok here for simplicity i have created half million buttons.
But in my real time application approximately have more or less same number of nodes (VBox, HBox, Group, labels, Rectangle etc).
So is there a way to overcome this issue ?