Error checking induce performance problems

Jorge Jiménez <[email protected]>
Newsgroups gmane.comp.python.opengl.devel
Message-ID <000001c7b391$fec39990$fc4accb0$@com>
Hi:

 

Profiling a pyopengl application I have been developing I obtained this
results:

 

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)

   213189   11.436    0.000   26.370    0.000 globjects.py:27(render)

  2145235    6.653    0.000   12.704    0.000 error.py:162(glCheckError)

  2144179    6.050    0.000    6.050    0.000 win32.py:72(safeGetError)

 

Where render is the function that does the main work of the app. As you can
see, error checking takes almost one half of the real work time. I think it
could be a good idea to be able to disable error checking once you know your
code works ok.

 

After Reading http://pyopengl.sourceforge.net/ctypes/using.html, I tried
this:

 

from OpenGL import error
def foobar(): pass

error.ErrorChecker.registerChecker(foobar)

 

But there is no gain in performance.

 

Regards,

Jorge

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

_______________________________________________
PyOpenGL Homepage
http://pyopengl.sourceforge.net
_______________________________________________
PyOpenGL-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyopengl-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.