MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0030964Open CASCADE[OCCT] OCCT:Data Exchangepublic2019-09-13 14:552019-10-06 09:44
Reporterkgv 
Assigned Toosa 
PrioritynormalSeverityfeature 
StatusresolvedResolutionopen 
PlatformOSOS Version
Product Version 
Target Version[OCCT] 7.5.0*Fixed in Version 
Summary0030964: Data Exchange - use Standard_ReadLineBuffer within OBJ reader
DescriptionFast prototype shows that using Standard_ReadLineBuffer may give 3x time performance boost on reading of large OBJ files (~ 1 GiB):
  struct RWObj_ReaderFile : public Standard_ReadLineBuffer
  {
...
    bool ReadLine()
    {
      size_t aLineLen = 0;
      int64_t aReadBytes = 0;
      Line = Standard_ReadLineBuffer::ReadLine (File, aLineLen, aReadBytes);
      Position += aReadBytes;
      return Line != NULL;


To complete the patch, Standard_ReadLineBuffer or its sub-class should be extended by handling of special multi-line case with \ at the end of the line.

Steps To ReproduceNot required
TagsNo tags attached.
Test case number
Attached Files

- Relationships

-  Notes
(0087144)
git (administrator)
2019-09-16 15:59

Branch CR30964 has been created by mzernova.

SHA-1: 5a7808160e8d767d50348786e73ac79d45bfabe3


No new revisions were added by this update.
(0087478)
git (administrator)
2019-09-24 14:30

Branch CR30964 has been updated by mzernova.

SHA-1: dd692d8b7b2129b5480d911ec45431dd0c8777d3


Detailed log of new commits:

Author: mzernova
Date: Tue Sep 17 16:05:05 2019 +0300

    0030964: Data Exchange - use Standard_ReadLineBuffer within OBJ reader
    
    The sub-class of Standard_ReadLineBuffer has been created. It supports a processing of the special multi-line case with \ at the end of the line.

(0087482)
kgv (developer)
2019-09-24 14:54

+//! Auxiliary tool for buffered reading of lines from input stream.
+class Standard_ReadLineBufferMultiline: Standard_ReadLineBuffer
+{

It would be more straightforward adding Boolean flag to Standard_ReadLineBuffer rather than introducing new global class.
(0087702)
git (administrator)
2019-10-02 17:49

Branch CR30964 has been updated by mzernova.

SHA-1: 9d8ff4fa57c27a1791cf563194561f778bb502a6


Detailed log of new commits:

Author: mzernova
Date: Thu Sep 26 17:18:49 2019 +0300

    Standard_RedLineBuffer was used to load Stl files

(0087713)
git (administrator)
2019-10-02 17:55

Branch CR30964_1 has been created by mzernova.

SHA-1: d1fbcd38aeb9728e0b87c04ea3a5d9b49eb5a4c5


Detailed log of new commits:

Author: mzernova
Date: Tue Sep 17 16:05:05 2019 +0300

    0030964: Data Exchange - use Standard_ReadLineBuffer within OBJ reader
    
    Standard_ReadLineBuffer now supports a processing of the special multi-line case with \ at the end of the line.
    
    Standard_RedLineBuffer was used to load Stl files
(0087714)
mzernova (developer)
2019-10-02 17:57

The patch CR30964 is ready to review
(0087715)
kgv (developer)
2019-10-02 18:13

Please put some comparison numbers for STL reader here.
(0087716)
kgv (developer)
2019-10-02 18:15

,
+                        bool theMultiline = false

I think it would be more convenient putting this as class field with getter/setter instead of method argument.
(0087717)
kgv (developer)
2019-10-02 18:17

+      if (Line != NULL)
+      {
+        delete [] Line;
+      }

This looks broken.
(0087816)
git (administrator)
2019-10-04 15:45

Branch CR30964_1 has been updated by mzernova.

SHA-1: ac59d773bd7de802b8b3c095b4ab6f0eae903e9e


Detailed log of new commits:

Author: mzernova
Date: Thu Oct 3 16:40:20 2019 +0300

    remarks from kgv

(0087819)
git (administrator)
2019-10-04 15:55

Branch CR30964_2 has been created by mzernova.

SHA-1: a51c3f01780df30d2792240e076b45908fdfb70f


Detailed log of new commits:

Author: mzernova
Date: Tue Sep 17 16:05:05 2019 +0300

    0030964: Data Exchange - use Standard_ReadLineBuffer within OBJ reader
    
    Standard_ReadLineBuffer now supports a processing of the special multi-line case with \ at the end of the line.
    
    Standard_RedLineBuffer was used to load Stl files
(0087822)
mzernova (developer)
2019-10-04 16:14

Time spent reading stl file:
    master: read in 211.481 s
    prototype: read in 89.087 s
(0087824)
mzernova (developer)
2019-10-04 16:16

Please review the branch CR30964_2
(0087883)
abv (manager)
2019-10-06 09:29

Kirill, please comment on why Standard_ReadLineBuffer is placed to package Standard instead of OSD or NCollection where we usually put this kind of tools?
(0087885)
kgv (developer)
2019-10-06 09:42
edited on: 2019-10-06 09:44

> Kirill, please comment on why Standard_ReadLineBuffer
> is placed to package Standard
> instead of OSD or NCollection where we usually put this kind of tools?
Because
- Standard_ArrayStreamBuffer and Standard_ReadBuffer of similar kind are already in Standard,
- they are not Operating-System-Dependent to be placed into OSD
- and they are not much templates to be placed into NCollection.
One can say there is also FSD (File-System-Dependent), but this package has been used for very strange classes so far.


- Issue History
Date Modified Username Field Change
2019-09-13 14:55 kgv New Issue
2019-09-13 14:55 kgv Assigned To => kgv
2019-09-13 14:55 kgv Assigned To kgv => mzernova
2019-09-13 14:55 kgv Status new => assigned
2019-09-13 14:56 kgv Relationship added child of 0030830
2019-09-13 14:56 kgv Relationship added child of 0029296
2019-09-13 15:02 kgv Description Updated View Revisions
2019-09-16 15:59 git Note Added: 0087144
2019-09-24 14:30 git Note Added: 0087478
2019-09-24 14:54 kgv Note Added: 0087482
2019-10-02 17:49 git Note Added: 0087702
2019-10-02 17:55 git Note Added: 0087713
2019-10-02 17:57 mzernova Note Added: 0087714
2019-10-02 17:57 mzernova Assigned To mzernova => osa
2019-10-02 17:57 mzernova Status assigned => resolved
2019-10-02 17:57 mzernova Steps to Reproduce Updated View Revisions
2019-10-02 18:13 kgv Note Added: 0087715
2019-10-02 18:15 kgv Note Added: 0087716
2019-10-02 18:17 kgv Note Added: 0087717
2019-10-04 15:45 git Note Added: 0087816
2019-10-04 15:55 git Note Added: 0087819
2019-10-04 16:14 mzernova Note Added: 0087822
2019-10-04 16:16 mzernova Note Added: 0087824
2019-10-06 09:28 abv Description Updated View Revisions
2019-10-06 09:29 abv Note Added: 0087883
2019-10-06 09:42 kgv Note Added: 0087885
2019-10-06 09:43 kgv Note Edited: 0087885 View Revisions
2019-10-06 09:43 kgv Note Edited: 0087885 View Revisions
2019-10-06 09:44 kgv Note Edited: 0087885 View Revisions


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker