<div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Feb 16, 2020 at 9:12 AM MythTV <<a href="mailto:noreply@mythtv.org">noreply@mythtv.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">#13517: Reducing memory usage by mythfilldatabase to 1/6 of original usage<br>
---------------------------------------+-------------------------------<br>
Reporter: Hans Dingemans | Owner: Peter Bennett<br>
Type: Patch - Feature | Status: assigned<br>
Priority: minor | Milestone: needs_triage<br>
Component: MythTV - Mythfilldatabase | Version: Master Head<br>
Severity: medium | Resolution:<br>
Keywords: | Ticket locked: 0<br>
---------------------------------------+-------------------------------<br>
<br>
Comment (by Peter Bennett):<br>
<br>
Gary - thank you for your valuable input.<br>
<br>
Hans -<br>
Regarding using database rollback - MythTV uses autocommit throughout, so<br>
I don't think that is an option.<br></blockquote><div>That won't be a problem; from the MYSQL manual:</div><div><blockquote>
<p>To disable autocommit mode implicitly for a single series of statements, use the START TRANSACTION statement:</p>
<p>With START TRANSACTION, autocommit remains <strong>disabled until you end the transaction with COMMIT or ROLLBACK.</strong> The autocommit mode then reverts to its previous state.</p>
</blockquote> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Does the system complete parsing before updating the database? </blockquote><div>Yes. <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">If so it<br>
should be easy to reject the whole run if there is an error.<br></blockquote><div>Yes this patch it does that already; however, I'll test a few of the cases Gary described, and come back to you, because I am not sure if the XML syntax checking is as accurate with QXmlStreamReader as it is with XDomDocument; I guess only the library maintainers know for sure :-) <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
When updating the database does it first delete old data? If so it would<br>
be dangerous to accept a half complete run because the program data may be<br>
deleted and not replaced.<br>
<br>
-- <br>
Ticket URL: <<a href="https://code.mythtv.org/trac/ticket/13517#comment:11" rel="noreferrer" target="_blank">https://code.mythtv.org/trac/ticket/13517#comment:11</a>><br>
MythTV <<a href="http://www.mythtv.org" rel="noreferrer" target="_blank">http://www.mythtv.org</a>><br>
MythTV Media Center<br></blockquote><div><br></div><div>Greetings, Hans.<br></div></div></div>