Bug 723944 - [RFE] Change DOM parsing to SAX
Summary: [RFE] Change DOM parsing to SAX
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: beakerlib
Version: 14
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
Assignee: Petr Muller
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 849087
TreeView+ depends on / blocked
 
Reported: 2011-07-21 15:41 UTC by Martin Kudlej
Modified: 2016-09-20 02:08 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
: 849087 (view as bug list)
Environment:
Last Closed: 2012-08-16 16:51:46 UTC
Type: ---


Attachments (Terms of Use)

Description Martin Kudlej 2011-07-21 15:41:03 UTC
Description of problem: It isn't effective to rewrite whole content of file for every log entry.
Every log of any log entry calls:
<code>
output = open(journal, 'wb')
output.write(newdoc.toxml().encode('utf-8'))
output.close()
</code>
Where newdoc is DOM of whole log which is parsed for every log of log entry.
So step for writing of every log entry are:
1. parse whole log file to DOM <- very resources consuming
2. add log entry
3. save DOM to file(practically save new file) <- very resource consuming

I recommend to add just XML elements at the end of the file for every log entry and at the end clean up the log by SAX or something similar because DOM parsing is very resources consuming.

Version-Release number of selected component (if applicable):
beakerlib-1.3-1.fc14.noarch

Comment 1 Petr Muller 2011-07-22 12:51:48 UTC
Yeah. I've once measured the effect of this nastiness on performance against an prototype in-memory representation (a daemon keeping journal in memory, communication via sockets => no parsing/saving), and found out the current implementation starts to measurably differ from the daemon @ ~800-1000 records. Most of the tests are not so big, so we dropped the idea of rewriting the journal at that time.

Currently, there is an effort to rewrite the journal to be handled by a daemon, and XML just one output format of an object internal representation.

Comment 2 Fedora End Of Life 2012-08-16 16:51:49 UTC
This message is a notice that Fedora 14 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 14. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained.  At this time, all open bugs with a Fedora 'version'
of '14' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this 
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen 
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we were unable to fix it before Fedora 14 reached end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" (top right of this page) and open it against that 
version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping


Note You need to log in before you can comment on or make changes to this bug.