Optimize gtk_widget_path_copy() by preallocating "elems" array
Optimize gtk_widget_path_copy() by preallocating "elems" array

gtk_widget_path_copy() currently calls g_array_append_val() in a loop,
which is inefficient due to reallocating the array's memory. Calling
g_array_set_size() before entering the loop reduces the number of CPU
cycles used by roughly 30%.

Patch by John Lindgren,
https://bugzilla.gnome.org/show_bug.cgi?id=679978

Lyude/gtk-,chergert/gtk,msteinert/gtk,davidgumberg/gtk,davidt/gtk,Lyude/gtk-,grubersjoe/adwaita,jessevdk/gtk,davidt/gtk,chergert/gtk,davidgumberg/gtk,ahodesuka/gtk,jadahl/gtk,Lyude/gtk-,bratsche/gtk-,alexlarsson/gtk,ahodesuka/gtk,davidt/gtk,jigpu/gtk,Distrotech/gtk2,jessevdk/gtk,Distrotech/gtk2,Adamovskiy/gtk,Lyude/gtk-,davidgumberg/gtk,msteinert/gtk,alexlarsson/gtk,davidt/gtk,ahodesuka/gtk,jigpu/gtk,Lyude/gtk-,ebassi/gtk,alexlarsson/gtk,davidt/gtk,Sidnioulz/SandboxGtk,ebassi/gtk,chergert/gtk,Adamovskiy/gtk,Lyude/gtk-,davidgumberg/gtk,alexlarsson/gtk,chergert/gtk,chergert/gtk,alexlarsson/gtk,alexlarsson/gtk,Adamovskiy/gtk,Adamovskiy/gtk,jigpu/gtk,grubersjoe/adwaita,Sidnioulz/SandboxGtk,ahodesuka/gtk,jessevdk/gtk,jadahl/gtk,jigpu/gtk,jigpu/gtk,jessevdk/gtk,bratsche/gtk-,Distrotech/gtk2,Distrotech/gtk2,jadahl/gtk,grubersjoe/adwaita,grubersjoe/adwaita,alexlarsson/gtk,ahodesuka/gtk,grubersjoe/adwaita,davidgumberg/gtk,ahodesuka/gtk,jigpu/gtk,msteinert/gtk,jadahl/gtk,Adamovskiy/gtk,ebassi/gtk,jadahl/gtk,davidgumberg/gtk,grubersjoe/adwaita,Sidnioulz/SandboxGtk,Sidnioulz/SandboxGtk,jessevdk/gtk,chergert/gtk,msteinert/gtk,jessevdk/gtk,jadahl/gtk,bratsche/gtk-,Sidnioulz/SandboxGtk,ebassi/gtk,Adamovskiy/gtk,ebassi/gtk,msteinert/gtk,davidgumberg/gtk,grubersjoe/adwaita,msteinert/gtk,bratsche/gtk-,jadahl/gtk,Adamovskiy/gtk,bratsche/gtk-,ebassi/gtk,ahodesuka/gtk,jigpu/gtk,chergert/gtk,ahodesuka/gtk,Distrotech/gtk2,alexlarsson/gtk,jessevdk/gtk,grubersjoe/adwaita,bratsche/gtk-,davidt/gtk,davidgumberg/gtk,jadahl/gtk,chergert/gtk,Adamovskiy/gtk,Lyude/gtk-,Distrotech/gtk2,Lyude/gtk-,Sidnioulz/SandboxGtk,jigpu/gtk