View Issue Details

IDProjectCategoryView StatusLast Update
0024189Open CASCADEOCCT:Visualizationpublic2013-12-19 13:58
ReporteraplAssigned Toapl 
PrioritynormalSeverityminor 
Status closedResolutionfixed 
PlatformAOSL 
Product Version6.7.0 
Target Version6.7.0Fixed in Version6.7.0 
Summary0024189: Rendering performance regression after implementation of per-object clipping
DescriptionAccording to frame rate comparison, there is a performance regression found for the application state when the feature is not used: e.g. no object-level clip planes defined. The regression appears only for high number of displayed objects. The results shown for 2000 small boxes.

Before:
FPS: 61.71399007153461
CPU: 15.756101000000022 msec

After:
FPS: 57.596517956669132
CPU: 16.224103999999997 msec

It is proposed to revise the following snippets of code:

OpenGl_ClippingState::Planes() could return const reference for internal collection.

OpenGl_Structure::Render(...)
{
  ...

  Graphic3d_SetOfHClipPlane aPlanesOn; (*)
  Graphic3d_SetOfHClipPlane::Iterator aPlaneIt (myClipPlanes);
  for (; aPlaneIt.More(); aPlaneIt.Next())
  {
    const Handle(Graphic3d_ClipPlane)& aUserPln = aPlaneIt.Value();
    if (aUserPln->IsOn())
      aPlanesOn.Add (aUserPln);
  }

  // set structure clipping planes
  if (aPlanesOn.Size() > 0)
  {
    aContext->ChangeClipping().Set (aPlanesOn, AWorkspace->ViewMatrix());
  }

...

}

* avoid allocation of collection if structure has no clippings defined.
Steps To Reproduce// the same as (just 2K boxes) bugs/vis/bug23069
pload VISUALIZATION
pload MODELING
vinit
for {set anInter 1} {$anInter <= 2000} {incr anInter} {box b${anInter} [expr $anInter * 20] 0 0 10 20 30; vdisplay b${anInter}; }
vfit
vfps
Additional information
and documentation updates
The performance regression and remarks have been corrected by issue 24224.

=========================================================
From the description of 24224:
=========================================================

Internal changes:

OpenGl_ClipPlaneState.cxx
OpenGl_ClipPlaneState.hxx
OpenGl_Structure.cxx

improved interface of clip plane state management to avoid performance regressions; fixed code remarks

TagsNo tags attached.
Test case number

Relationships

related to 0024224 closedbugmaster Open CASCADE Suspicious logics in changing clipping planes at OpenGl_Structure 

Activities

apl

2013-09-23 12:14

developer   ~0025699

Additional notes:
Remove redundant declaration of OpenGl_Structure::DrawCapping
Remove unused commented code at OpenGl_ClippingState

apl

2013-10-08 16:22

developer   ~0025967

The performance patch has been introduced by fix for 0024224.

apl

2013-10-08 16:22

developer   ~0025968

The results prior to patch with capping & clipping (0024070):

Highest CPU performance:
FPS: 57.575139198577126
CPU: 16.380105 msec

Lowest CPU performance:
FPS: 57.685042823789502
CPU: 16.692107000000007 msec


The results after patch (0024224, including 24070):

Highest CPU performance:
FPS: 58.110396973959986
CPU: 16.380105 msec

Lowest CPU performance:
FPS: 57.958128763574308
CPU: 16.848108000000011 msec

Performance compared on card: NVIDIA Quadro K4000, CPU: Core i5-3450

apl

2013-10-10 10:40

developer   ~0026013

Dear Bugmaster,

The performance regression is fixed by 0024224 - as this one is interconnected with it.

Please close this issue.

bugmaster

2013-10-15 12:25

administrator   ~0026085

performance regression was fixed by 0024224

Issue History

Date Modified Username Field Change
2013-09-18 18:20 apl New Issue
2013-09-18 18:20 apl Assigned To => apl
2013-09-18 19:15 kgv Steps to Reproduce Updated
2013-09-23 12:14 apl Note Added: 0025699
2013-10-07 09:00 apl Status new => assigned
2013-10-07 09:00 apl Relationship added related to 0024224
2013-10-08 16:22 apl Note Added: 0025967
2013-10-08 16:22 apl Note Added: 0025968
2013-10-10 10:40 apl Note Added: 0026013
2013-10-10 10:40 apl Assigned To apl => bugmaster
2013-10-10 10:40 apl Status assigned => feedback
2013-10-15 12:25 bugmaster Assigned To bugmaster => apl
2013-10-15 12:25 bugmaster Status feedback => tested
2013-10-15 12:25 bugmaster Note Added: 0026085
2013-10-15 12:25 bugmaster Status tested => verified
2013-10-15 12:25 bugmaster Resolution open => fixed
2013-10-17 11:10 apl Additional Information Updated
2013-10-17 11:24 apl Additional Information Updated
2013-12-19 13:51 bugmaster Status verified => closed
2013-12-19 13:58 bugmaster Fixed in Version => 6.7.0