You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using openvdb 6.2.1 on the windows11.
meshToVolume getting slower and slower when system have lots of VDB grids.
Larger grids and many of grids get more significant slower.
And even if I delete the stored array, slowdown speed will not be restored.
Why is this happens?
And This is part of the result.
0: 0.563 sec
1: 0.563 sec
2: 0.562 sec
3: 0.563 sec
4: 0.562 sec
~
96: 0.758 sec
97: 0.753 sec
98: 0.764 sec
99: 0.753 sec
100: 0.762 sec
This issue occurs when I have multiple openvdb::grid::Prt as well as std grid array.
If I don't store grids to array, it have no slowdown., like this
openvdb::FloatGrid::Ptr tempGrid;
std::vector<openvdb::FloatGrid::Ptr> tempLS;
tempLS.resize(400, NULL);
DWORD start, end;
for (int i = 0; i < 10; i++)
{
start = GetTickCount64();
tempGrid = openvdb::tools::meshToVolume<openvdb::FloatGrid>(polymesh, *transform, exBand, inBand, 0, &polyIndexGrid);
end = GetTickCount64();
printf("%d : %.3lf sec\n", i, (double)(end - start) * 0.001);
for (int j = 0; j < 400; j++)
{
tempLS[j] = tempGrid->deepCopy();
}
}
This result is
0: 0.563 sec
1: 0.672 sec
2: 0.672 sec
3: 0.688 sec
4: 0.687 sec
5: 0.672 sec
6: 0.672 sec
7: 0.688 sec
8: 0.657 sec
9: 0.672 sec
This means that have same problem which system have lot of array, meshToVolume get slower. But reuse of same grid array does not couse slowdown.
Then I add ->clear for array grid
openvdb::FloatGrid::Ptr tempGrid;
std::vector<openvdb::FloatGrid::Ptr> tempLS;
tempLS.resize(400, NULL);
DWORD start, end;
for (int i = 0; i < 10; i++)
{
start = GetTickCount64();
tempGrid = openvdb::tools::meshToVolume<openvdb::FloatGrid>(polymesh, *transform, exBand, inBand, 0, &polyIndexGrid);
end = GetTickCount64();
printf("%d : %.3lf sec\n", i, (double)(end - start) * 0.001);
for (int j = 0; j < 400; j++)
{
tempLS[j] = tempGrid->deepCopy();
}
for (int j = 0; j < 400; j++)
{
tempLS[j]->clear();
}
}
This result is
0: 0.547 sec
1: 0.766 sec
2: 0.985 sec
3: 1.141 sec
4: 1.250 sec
5: 1.328 sec
6: 1.437 sec
7: 1.578 sec
8: 1.704 sec
9: 1.719 sec
So, I get some more slow down. This means that grid->clear() might be cause heavy memory fragment or leak or something??
I'm using openvdb 6.2.1 on the windows11.
meshToVolume getting slower and slower when system have lots of VDB grids.
Larger grids and many of grids get more significant slower.
And even if I delete the stored array, slowdown speed will not be restored.
Why is this happens?
Here is the simple test code.
And This is part of the result.
0: 0.563 sec
1: 0.563 sec
2: 0.562 sec
3: 0.563 sec
4: 0.562 sec
~
96: 0.758 sec
97: 0.753 sec
98: 0.764 sec
99: 0.753 sec
100: 0.762 sec
This issue occurs when I have multiple openvdb::grid::Prt as well as std grid array.
If I don't store grids to array, it have no slowdown., like this
And This is part of the result.
0: 0.563 sec
1: 0.563 sec
2: 0.564 sec
3: 0.562 sec
4: 0.563 sec
~
96: 0.568 sec
97: 0.563 sec
98: 0.574 sec
99: 0.563 sec
100: 0.572 sec
thanks
The text was updated successfully, but these errors were encountered: