One of the things about Pyglet that I've always had a problem with is the sheer number of functions and other objects defined in the *pyglet.gl.** modules. I know that this stuff is required to provide compatibility with the entire OpenGL command set, but I also suspect only a fraction of such objects are in use in any one program that uses Pyglet.
Initializing all these objects has a noticeable effect on Pyglet's startup time and memory footprint. Just creating a single window with Pyglet requires something like 40-50MB (in Windows 10, 64-bit, anyway). Here's an idea I had for how to ameliorate this: A utility that, when run on a particular instance of Pyglet (when it's included manually in a codebase, not when it's present universally by way of *pip install*), comments out all of the functions in the *gl* modules that are not actually used in the codebase, including in Pyglet itself. This way, only the objects that are actually used are instantiated. If you need access to a particular function call, you just uncomment it. I'm not suggesting this be the default behavior. This is more of a utility that someone would use when deploying Pyglet as part of an application's codebase, so that it would run all the more efficiently when deployed in a standalone fashion. -- You received this message because you are subscribed to the Google Groups "pyglet-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/pyglet-users. For more options, visit https://groups.google.com/d/optout.
