FabriceSalvaire / PyOpenGLng

An OpenGL CFFI (and ctypes) binding for Python
http://fabricesalvaire.github.io/PyOpenGLng
GNU General Public License v3.0
10 stars 2 forks source link

Profile the time to read the xml file and to generate the wrapper #11

Closed FabriceSalvaire closed 9 years ago

FabriceSalvaire commented 9 years ago

We can imagine to cache this process:

FabriceSalvaire commented 9 years ago

basic-wrapper-test shows clearly the wrapper generation takes some times.

FabriceSalvaire commented 9 years ago

After measuring the time of each initialisation steps, I concluded that the pickling of the XML Registry (GlSpecParser class) is not sufficient since the unpickling doesn't reduce significantly the loading time. However the pickling of the API (enums and commands) reduces the loading time by a factor 5.

The CachedGlSpecParser should solve the loading time issue, and I don't have no more idea to reduce the loading time.

dbe92dac0bab47584d3a1f77f4fbcf6e67f4f744