[mythtv-commits] [MythTV/mythtv] f5d75a: mythfilldatabase: reduce memory usage.

Mark Kendall noreply at github.com
Fri May 1 18:58:06 UTC 2020


  Branch: refs/heads/fixes/31
  Home:   https://github.com/MythTV/mythtv
  Commit: f5d75a6de7c4ac668e1a64cdf31c7100bc81b65b
      https://github.com/MythTV/mythtv/commit/f5d75a6de7c4ac668e1a64cdf31c7100bc81b65b
  Author: Hans Dingemans <jpldingemans at gmail.com>
  Date:   2020-05-01 (Fri, 01 May 2020)

  Changed paths:
    M mythtv/programs/mythfilldatabase/filldata.cpp
    M mythtv/programs/mythfilldatabase/xmltvparser.cpp
    M mythtv/programs/mythfilldatabase/xmltvparser.h

  Log Message:
  -----------
  mythfilldatabase: reduce memory usage.

Mythfilldatabase uses QDomDocument to parse and store the XML data that is read; according to QDomDocument documentation this object is not meant to handle large XML files; QXmlStreamReader should be used in these situations.

This commit replaces QDomDocument by QXmlStreamreader.

A test showed that memory usage dropped from 5.6 GB to 698 MB.

Fixes #13517

Signed-off-by: Peter Bennett <pbennett at mythtv.org>
(cherry picked from commit a9aa006139da24cbad861a2c25d57fa3f71aba2a)


  Commit: a2b8c262dc96274ef55be25c510a4bbe9b6b52b2
      https://github.com/MythTV/mythtv/commit/a2b8c262dc96274ef55be25c510a4bbe9b6b52b2
  Author: Mark Kendall <mark.kendall at gmail.com>
  Date:   2020-05-01 (Fri, 01 May 2020)

  Changed paths:
    M mythtv/programs/mythfilldatabase/xmltvparser.cpp

  Log Message:
  -----------
  mythfilldatabase: Fix 2 potential leaks

- introduced in a9aa006139da24cb and picked up by coverity.

(cherry picked from commit cf282591a249864215c82cb7248153b3033d6ea1)


Compare: https://github.com/MythTV/mythtv/compare/723d46eaaa7b...a2b8c262dc96


More information about the mythtv-commits mailing list