Archived issue #0023069
OpenGL state extraction for GL_RENDER_MODE significantly impact performance
Description
Currently GL_RENDER_MODE checked in TKOpenGl routines (text rendering, primitive arrays rendering, markers rendering) to perform special code for gl2ps export.
This is determined that these OpenGL state extractions per rendered object significantly impact overall rendering performance - make it more CPU-bound.
Because gl2ps export is still desired this is suggested to cache GL_RENDER_MODE state at frame redrawing beginning.
This is determined that these OpenGL state extractions per rendered object significantly impact overall rendering performance - make it more CPU-bound.
Because gl2ps export is still desired this is suggested to cache GL_RENDER_MODE state at frame redrawing beginning.
Steps to reproduce
To reproduce problem this is required to render number of simple objects to reach CPU performance limit on current station.
Commenting out 'glGetIntegerv (GL_RENDER_MODE, &renderMode);' calls reduce CPU usage.
On tested platform (Windows 7, GeForce GT240) CPU-limit reached within 1k boxes:
pload VISUALIZATION
pload MODELING
vinit
for {set anInter 1} {$anInter <= 1000} {incr anInter} {box b${anInter} [expr $anInter * 20] 0 0 10 20 30; vdisplay b${anInter}; }
vfit
vfps
Notice that this script requires vfps command introduced by #23065.
The actual results are current OCCT version:
FPS: 40.961348099055449
CPU: 26.988172999999982 msec
Commented GL_RENDER_MODE calls:
FPS: 59.906130822034626
CPU: 17.472111999999989 msec
Commenting out 'glGetIntegerv (GL_RENDER_MODE, &renderMode);' calls reduce CPU usage.
On tested platform (Windows 7, GeForce GT240) CPU-limit reached within 1k boxes:
pload VISUALIZATION
pload MODELING
vinit
for {set anInter 1} {$anInter <= 1000} {incr anInter} {box b${anInter} [expr $anInter * 20] 0 0 10 20 30; vdisplay b${anInter}; }
vfit
vfps
Notice that this script requires vfps command introduced by #23065.
The actual results are current OCCT version:
FPS: 40.961348099055449
CPU: 26.988172999999982 msec
Commented GL_RENDER_MODE calls:
FPS: 59.906130822034626
CPU: 17.472111999999989 msec
Public activity
3 archived notes
Participants are labeled by their role within this record.
Patch is ready for review in branch CR23069.
Please notice that text rendering functionality leaved untouched due to different design (should be fixed within text rendering total reworking).
Please notice that text rendering functionality leaved untouched due to different design (should be fixed within text rendering total reworking).
CR23069 reviewed without remarks, ready for testing.
Dear BugMaster,
Workbench KAS:dev:mkv-23069-occt was created from git branch CR23069
(and mkv-23069-products from svn trunk) and compiled on Linux platform.
Test case for this bug is chl/934/Y9. It is OK.
There are not regressions in mkv-23069-products regarding to KAS:dev:products-20120330-opt
See results in /QADisk/occttests/results/KAS/dev/mkv-23069-products_06042012/lin
See reference results in /QADisk/occttests/results/KAS/dev/products-20120330-opt_30032012/lin
See test cases in /QADisk/occttests/tests/ED
N.B. In order to launch testing case you can make use the following instructions
http://doc/doku.php?id=occt:certification
Workbench KAS:dev:mkv-23069-occt was created from git branch CR23069
(and mkv-23069-products from svn trunk) and compiled on Linux platform.
Test case for this bug is chl/934/Y9. It is OK.
There are not regressions in mkv-23069-products regarding to KAS:dev:products-20120330-opt
See results in /QADisk/occttests/results/KAS/dev/mkv-23069-products_06042012/lin
See reference results in /QADisk/occttests/results/KAS/dev/products-20120330-opt_30032012/lin
See test cases in /QADisk/occttests/tests/ED
N.B. In order to launch testing case you can make use the following instructions
http://doc/doku.php?id=occt:certification
Related records