mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 07:23:09 +02:00
lib/xmltree/xmlinterface.cpp: use posix_fadvise to try reduce cached pages, while loading huge epg data
This commit is contained in:
@@ -42,7 +42,8 @@
|
|||||||
#else /* USE_LIBXML */
|
#else /* USE_LIBXML */
|
||||||
#include "xmltok.h"
|
#include "xmltok.h"
|
||||||
#endif /* USE_LIBXML */
|
#endif /* USE_LIBXML */
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
unsigned long xmlGetNumericAttribute(const xmlNodePtr node, const char *name, const int base)
|
unsigned long xmlGetNumericAttribute(const xmlNodePtr node, const char *name, const int base)
|
||||||
{
|
{
|
||||||
@@ -239,6 +240,9 @@ xmlDocPtr parseXmlFile(const char * filename, bool warning_by_nonexistence /* =
|
|||||||
}
|
}
|
||||||
while (!done);
|
while (!done);
|
||||||
|
|
||||||
|
if (posix_fadvise(fileno(xml_file), 0, 0, POSIX_FADV_DONTNEED) != 0)
|
||||||
|
perror("posix_fadvise FAILED!");
|
||||||
|
|
||||||
fclose(xml_file);
|
fclose(xml_file);
|
||||||
|
|
||||||
if (!tree_parser->RootNode())
|
if (!tree_parser->RootNode())
|
||||||
|
Reference in New Issue
Block a user