Are you using the same GTK/glib versions?
No GTK 3.18.9, GLib 2.48.2
I think its far more likely to be sensitive to the time between on and off, on is the thing that loads the .so and links symbols, ok, its likely to be faster the second and subsequent times, but still its some work. And if your version of Glib tries to do the module load asynchronously the UI may be active before everything is set up.