View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0022584 | Community | OCCT:Mesh | public | 2011-06-07 19:27 | 2012-11-09 10:17 |
Reporter | Assigned To | Roman Lygin | |||
Priority | normal | Severity | feature | ||
Status | closed | Resolution | fixed | ||
OS | All | ||||
Target Version | 6.5.2 | Fixed in Version | 6.5.2 | ||
Summary | 0022584: Optimization of BRepMesh_DiscretFactory to cache registered factory methods | ||||
Description | RLN contribution (RLN_fix370) - Summary: Optimization of BRepMesh_DiscretFactory to cache registered factory methods - Detailed description: In 6.3.1 any custom factory method (*::Discret()) is loaded from dynamic library upon every call to mesher. This was extremely slow and made the mechanism unusable. Now library is loaded only once and then its factory method is cached in _DiscretFactory. - This requires adding an instance of DataMap<AsciiString,OSD_Function>. To optimize it is added into OSD package and Draw and Plugin packages reuse it. | ||||
Tags | No tags attached. | ||||
Test case number | no need for test case | ||||
|
While this patch introduce plugins functions caching (thus eliminates linkage with plugin and retrieving function address on each call to the factory) it doesn't resolve another serious issure with current factory architecture. BRepMesh_DiscretFactory::Discret() returns private field myPDiscret of class instance that intended to be global (BRepMesh_DiscretFactory& BRepMesh_DiscretFactory::Get()). This makes factory absolutely unsafe for calling from multiple threads. I think this major problem should be fixed within this performance improvement. Suggested solution to return handle instead of pointer within this method (BRepMesh_PDiscretRoot could be redefined to be handle to avoid changes in applications) and probably introduce mutex to ensure thread-safety on first call when plugin changed. |
|
Suggested improvements are implemented in OCC22600 BUG |
Date Modified | Username | Field | Change |
---|---|---|---|
2011-06-23 18:31 | kgv | OtherBugsDependingOnThis | => 22600 |
2011-07-05 18:11 | kgv | CC | => kgv |
2011-08-02 11:31 | bugmaster | Category | OCCT:MOA => OCCT:Modeling Algorithms |
2011-09-13 09:27 |
|
Test case number | => no need for test case |
2011-09-13 09:27 |
|
Status | acknowledged => verified |
2011-09-13 09:27 |
|
Fixed in Version | EMPTY => |
2011-09-13 09:27 |
|
Resolution | suspended => fixed |
2011-09-13 09:27 |
|
Assigned To | bugmaster => kgv |
2011-09-20 17:22 |
|
Target Version | => 6.5.2 |
2011-09-20 17:22 |
|
Description Updated | |
2011-11-25 11:46 |
|
Description Updated | |
2011-12-05 11:22 |
|
Relationship added | child of 0022825 |
2012-01-17 18:37 |
|
Assigned To | kgv => Roman Lygin |
2012-11-09 10:17 |
|
Category | OCCT:Modeling Algorithms => OCCT:Mesh |