View Issue Details

IDProjectCategoryView StatusLast Update
0029218Open CASCADEOCCT:Application Frameworkpublic2017-11-30 07:05
Reporterkgv Assigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionno change required 
Product Version7.2.0 
Summary0029218: Application Framework - reading XML document calls LDOM parsing at least 3 times
DescriptionIt seems, that reading XML document calls LDOM parser on entire file at least 3 times (2 times for probing/detecting format and 1 for actual reading).

It looks like a redundant overhead for using XML format efficiently.
Steps To ReproduceN/A.
TagsNo tags attached.
Test case number

Relationships

related to 0029219 closedvro Open CASCADE Application Framework - XML document is written with CRLF on Windows 

Activities

git

2017-11-22 12:55

administrator   ~0072392

Branch CR29218 has been created by szy.

SHA-1: 7b23e1c5e9863386f40f4a12c985d65e996c0705


Detailed log of new commits:

Author: szy
Date: Wed Nov 22 12:54:33 2017 +0300

    0029218: Application Framework - reading XML document calls LDOM parsing at least 3 times.
    
    //Optimization only

szy

2017-11-22 15:19

manager   ~0072399

Short explanation.
Indeed the Parser is called 3 times. But 2 times it is called just for format identification and only third time for real document parsing. First two calls are very short. They read just a single element (XML_START_ELEMENT) from the document header (defined by tag "document format") and cancel parsing.
There is no sufficient lost of performance during document reading.
Nevertheless the process may be a little bit optimized in next way.
There are some duplication caused by current persistence architecture logic.
Method "CanRetrieve" calls methods methods 'Format()' which calls Parser and
'ReaderFromFormat()'. Returned values (Format and Reader) in fact are not used inside. They are used only for check that it is feasible. Later during call of the method 'CDF_Application::Retrieve()' methods are called once again.
It is proposed to eliminate these calls in 'CanRetrieve' and keep only in 'Retrieve'. It is the simplest and the cheapest way which impacts only CDF_Application 'cxx'(see CR29218). Other approaches requires more sufficient modifications without sufficient benefit. Overlook it, please and give me your remarks.
Thanks.

kgv

2017-11-23 14:27

developer   ~0072441

Last edited: 2017-11-23 14:35

>There is no sufficient lost of performance during document reading.
OK, agree - there seems to be no performance issue due to multiple parsing - theWithoutRoot does the trick and only 3rd parsing takes considerable time (~ 10% of entire model reading; which depends on the model, of course).

Though slow input stream (like unpacking on the fly / DRM / slow hardware) might increase overhead to some degree.

mpv

2017-11-23 14:33

developer   ~0072443

Dear bugmaster,

please close the issue since no fix is needed

git

2017-11-30 07:05

administrator   ~0072601

Branch CR29218 has been deleted by abv.

SHA-1: 7b23e1c5e9863386f40f4a12c985d65e996c0705

Issue History

Date Modified Username Field Change
2017-10-12 14:51 kgv New Issue
2017-10-12 14:51 kgv Assigned To => mpv
2017-10-12 14:53 kgv Relationship added related to 0029219
2017-10-16 09:44 mpv Assigned To mpv => szy
2017-11-22 12:53 szy Status new => assigned
2017-11-22 12:55 git Note Added: 0072392
2017-11-22 15:19 szy Note Added: 0072399
2017-11-22 15:19 szy Assigned To szy => mpv
2017-11-22 15:19 szy Status assigned => resolved
2017-11-22 15:19 szy Steps to Reproduce Updated
2017-11-23 14:27 kgv Note Added: 0072441
2017-11-23 14:27 kgv Note Edited: 0072441
2017-11-23 14:27 kgv Note Edited: 0072441
2017-11-23 14:32 mpv Assigned To mpv => inv
2017-11-23 14:33 mpv Assigned To inv => bugmaster
2017-11-23 14:33 mpv Note Added: 0072443
2017-11-23 14:35 kgv Note Edited: 0072441
2017-11-24 11:35 bugmaster Status resolved => closed
2017-11-24 11:35 bugmaster Resolution open => no change required
2017-11-30 07:03 abv Target Version 7.4.0 =>
2017-11-30 07:05 git Note Added: 0072601