Skip to content
Merged

Tests #1839

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 31 additions & 29 deletions benchmark.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,38 @@
# System informations
{"cpuName":"Apple M1","freeRam":163.59375,"totalRam":8192}
{"cpuName":"Apple M1","freeRam":202.546875,"totalRam":8192}
_________
| filename | Size (mb) | Time to open model (ms) | Time to execute all (ms) | Total ifc entities | Total meshes | Total geometries | total errors |
|-------|-------|-------|-------|-------|-------|-------|-------|
| tests/ifcfiles/public/AC20-FZK-Haus.ifc | 2 | 32 | 243 | 44249 | 83 | 103 | 0 |
tests/ifcfiles/public/C20-Institute-Var-2.ifc | 10 | 80 | 612 | 147712 | 702 | 821 | 0 |
tests/ifcfiles/public/FM_ARC_DigitalHub.ifc | 14 | 121 | 1140 | 266483 | 705 | 725 | 0 |
tests/ifcfiles/public/ISSUE_005_haus.ifc | 2 | 21 | 212 | 44249 | 83 | 103 | 0 |
tests/ifcfiles/public/ISSUE_021_Mini Project.ifc | 3 | 22 | 699 | 49044 | 2636 | 3697 | 0 |
tests/ifcfiles/public/ISSUE_034_HouseZ.ifc | 5 | 34 | 155 | 81806 | 228 | 239 | 0 |
tests/ifcfiles/public/ISSUE_044_test_IFCCOMPOSITEPROFILEDEF.ifc | 0 | 1 | 0 | 435 | 7 | 11 | 0 |
tests/ifcfiles/public/ISSUE_053_20181220Holter_Tower_10.ifczip | 29 | 1740 | 5648 | 2807815 | 60285 | 60847 | 0 |
tests/ifcfiles/public/ISSUE_068_ARK_NUS_skolebygg.ifc | 55 | 584 | 2239 | 945194 | 4459 | 4542 | 0 |
tests/ifcfiles/public/ISSUE_102_M3D-CON-CD.ifc | 26 | 238 | 2340 | 503608 | 1616 | 1635 | 0 |
tests/ifcfiles/public/ISSUE_102_M3D-CON.ifc | 6 | 47 | 219 | 123282 | 138 | 143 | 0 |
tests/ifcfiles/public/ISSUE_126_model.ifc | 4 | 33 | 130 | 88876 | 257 | 288 | 0 |
tests/ifcfiles/public/ISSUE_129_N1540_17_EXE_MOD_448200_02_09_11SMC_IGC_V17.ifc | 12 | 91 | 667 | 202661 | 959 | 981 | 0 |
tests/ifcfiles/public/ISSUE_159_kleine_Wohnung_R22.ifc | 10 | 88 | 732 | 189788 | 425 | 457 | 0 |
tests/ifcfiles/public/ISSUE_171_IfcSurfaceCurveSweptAreaSolid.ifc | 0 | 2 | 20 | 4327 | 60 | 141 | 0 |
| tests/ifcfiles/public/AC20-FZK-Haus.ifc | 2 | 28 | 195 | 44249 | 83 | 103 | 0 |
tests/ifcfiles/public/C20-Institute-Var-2.ifc | 10 | 78 | 547 | 147712 | 702 | 821 | 0 |
tests/ifcfiles/public/FM_ARC_DigitalHub.ifc | 14 | 92 | 859 | 266483 | 705 | 725 | 0 |
tests/ifcfiles/public/ISSUE_005_haus.ifc | 2 | 17 | 177 | 44249 | 83 | 103 | 0 |
tests/ifcfiles/public/ISSUE_021_Mini Project.ifc | 3 | 21 | 623 | 49044 | 2636 | 3697 | 0 |
tests/ifcfiles/public/ISSUE_034_HouseZ.ifc | 5 | 33 | 140 | 81806 | 228 | 239 | 0 |
tests/ifcfiles/public/ISSUE_044_test_IFCCOMPOSITEPROFILEDEF.ifc | 0 | 0 | 0 | 435 | 7 | 11 | 0 |
tests/ifcfiles/public/ISSUE_053_20181220Holter_Tower_10.ifczip | 29 | 1301 | 4471 | 2807815 | 60285 | 60847 | 0 |
tests/ifcfiles/public/ISSUE_068_ARK_NUS_skolebygg.ifc | 55 | 413 | 1931 | 945194 | 4459 | 4542 | 0 |
tests/ifcfiles/public/ISSUE_098_R8_F1_MAB_AR_M3_XX_XXX_MO_7000.ifc | 70 | 492 | 5098 | 1139622 | 11124 | 11338 | 0 |
tests/ifcfiles/public/ISSUE_102_M3D-CON-CD.ifc | 26 | 224 | 2119 | 503608 | 1616 | 1635 | 0 |
tests/ifcfiles/public/ISSUE_102_M3D-CON.ifc | 6 | 45 | 178 | 123282 | 138 | 143 | 0 |
tests/ifcfiles/public/ISSUE_126_model.ifc | 4 | 31 | 98 | 88876 | 257 | 288 | 0 |
tests/ifcfiles/public/ISSUE_129_N1540_17_EXE_MOD_448200_02_09_11SMC_IGC_V17.ifc | 12 | 82 | 580 | 202661 | 959 | 981 | 0 |
tests/ifcfiles/public/ISSUE_159_kleine_Wohnung_R22.ifc | 10 | 71 | 575 | 189788 | 425 | 457 | 0 |
tests/ifcfiles/public/ISSUE_171_IfcSurfaceCurveSweptAreaSolid.ifc | 0 | 2 | 18 | 4327 | 60 | 141 | 0 |
tests/ifcfiles/public/IfcOpenHouse_IFC4.ifc | 0 | 1 | 6 | 2885 | 35 | 43 | 0 |
tests/ifcfiles/public/KIT-Simple-Road-Test-Web-IFC4x3_RC2.ifc | 0 | 3 | 4 | 6500 | 66 | 119 | 0 |
tests/ifcfiles/public/Office_A_20110811.ifc | 4 | 27 | 280 | 62930 | 803 | 810 | 0 |
tests/ifcfiles/public/S_Office_Integrated Design Archi.ifc | 30 | 304 | 6086 | 551442 | 3417 | 3873 | 0 |
tests/ifcfiles/public/Sample_entities.ifc | 0 | 0 | 1 | 466 | 2 | 10 | 0 |
tests/ifcfiles/public/Viadotto Acerno.ifc | 32 | 225 | 3732 | 253318 | 6546 | 7051 | 0 |
tests/ifcfiles/public/advanced_model.ifc | 34 | 379 | 2387 | 594374 | 6401 | 14120 | 0 |
tests/ifcfiles/public/dental_clinic.ifc | 12 | 200 | 431 | 209259 | 2586 | 2626 | 0 |
tests/ifcfiles/public/duplex.ifc | 2 | 16 | 65 | 38898 | 215 | 224 | 0 |
tests/ifcfiles/public/KIT-Simple-Road-Test-Web-IFC4x3_RC2.ifc | 0 | 2 | 4 | 6500 | 66 | 119 | 0 |
tests/ifcfiles/public/LTU_A-House_redesign.ifczip | 34 | 1312 | 6512 | 3359234 | 6928 | 6945 | 0 |
tests/ifcfiles/public/Office_A_20110811.ifc | 4 | 27 | 180 | 62930 | 803 | 810 | 0 |
tests/ifcfiles/public/S_Office_Integrated Design Archi.ifc | 30 | 244 | 5399 | 551442 | 3417 | 3873 | 0 |
tests/ifcfiles/public/Sample_entities.ifc | 0 | 0 | 0 | 466 | 2 | 10 | 0 |
tests/ifcfiles/public/Viadotto Acerno.ifc | 32 | 225 | 3216 | 253318 | 6546 | 7051 | 0 |
tests/ifcfiles/public/advanced_model.ifc | 34 | 275 | 1563 | 594374 | 6401 | 14120 | 0 |
tests/ifcfiles/public/dental_clinic.ifc | 12 | 83 | 398 | 209259 | 2586 | 2626 | 0 |
tests/ifcfiles/public/duplex.ifc | 2 | 15 | 60 | 38898 | 215 | 224 | 0 |
tests/ifcfiles/public/example.ifc | 0 | 3 | 8 | 6488 | 115 | 119 | 0 |
tests/ifcfiles/public/ifcbridge-model01.ifc | 14 | 116 | 492 | 296968 | 165 | 168 | 0 |
tests/ifcfiles/public/schependomlaan.ifc | 47 | 424 | 612 | 714485 | 3569 | 3643 | 0 |
tests/ifcfiles/public/tested_sample_project.ifc | 1 | 5 | 98 | 14119 | 93 | 98 | 0 |
tests/ifcfiles/public/ifcbridge-model01.ifc | 14 | 109 | 302 | 296968 | 165 | 168 | 0 |
tests/ifcfiles/public/schependomlaan.ifc | 47 | 337 | 501 | 714485 | 3569 | 3643 | 0 |
tests/ifcfiles/public/tested_sample_project.ifc | 1 | 5 | 75 | 14119 | 93 | 98 | 0 |
#Totals
*Total Time to Open*:4837
*Total Time*:29258
*Total Time to Open*:5568
*Total Time*:35833
17 changes: 15 additions & 2 deletions src/cpp/web-ifc/parsing/IfcFileStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,17 @@

IfcTokenStream::IfcFileStream::IfcFileStream(const std::function<uint32_t(char *, size_t, size_t)> &requestData, uint32_t size) : _dataSource(requestData), _size(size)
{
_buffer = nullptr;
load();

char * countBuffer = new char[_size];
size_t countSize = 0;
size_t startCountRef =0;
while ((countSize = _dataSource(countBuffer, startCountRef, _size)) != 0) {
for (size_t i=0; i < countSize;i++) if (countBuffer[i]=='\n') noLines++;
startCountRef+=countSize;
}
delete[] countBuffer;
_buffer = nullptr;
load();
}

IfcTokenStream::IfcFileStream::~IfcFileStream()
Expand All @@ -19,6 +28,10 @@
_buffer = nullptr;
}
}

size_t IfcTokenStream::IfcFileStream::GetNoLines() {
return noLines;
}

void IfcTokenStream::IfcFileStream::load()
{
Expand Down
3 changes: 2 additions & 1 deletion src/cpp/web-ifc/parsing/IfcLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,8 @@ namespace webifc::parsing {

void IfcLoader::ParseLines()
{
uint32_t currentIfcType = 0;
_lines.reserve(_tokenStream->GetNoLines());
uint32_t currentIfcType = 0;
uint32_t currentExpressID = 0;
uint32_t currentTapeOffset = 0;
while (!_tokenStream->IsAtEnd())
Expand Down
Loading