MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0024189Open CASCADE[OCCT] OCCT:Visualizationpublic2013-09-18 18:202013-12-19 13:58
Reporterapl 
Assigned Toapl 
PrioritynormalSeverityminor 
StatusclosedResolutionfixed 
PlatformAOSLOS VersionL
Product Version[OCCT] 6.7.0 
Target Version[OCCT] 6.7.0Fixed in Version[OCCT] 6.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
Attached Files

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

-  Notes
(0025699)
apl (developer)
2013-09-23 12:14

Additional notes:
Remove redundant declaration of OpenGl_Structure::DrawCapping
Remove unused commented code at OpenGl_ClippingState
(0025967)
apl (developer)
2013-10-08 16:22

The performance patch has been introduced by fix for 0024224.
(0025968)
apl (developer)
2013-10-08 16:22

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
(0026013)
apl (developer)
2013-10-10 10:40

Dear Bugmaster,

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

Please close this issue.
(0026085)
bugmaster (administrator)
2013-10-15 12:25

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 18:21 apl Relationship added related to 0024070
2013-09-18 19:15 kgv Steps to Reproduce Updated View Revisions
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 View Revisions
2013-10-17 11:24 apl Additional Information Updated View Revisions
2013-12-19 13:51 bugmaster Status verified => closed
2013-12-19 13:58 bugmaster Fixed in Version => 6.7.0


Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker