From 83e65661d3dac715e02f474267b7e96aeeb99dac Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Wed, 23 Jul 2014 13:15:55 +0400 Subject: [PATCH] lib/xmltree/xmlinterface.cpp: use posix_fadvise to try reduce cached pages, while loading huge epg data Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/f15e5eeb39e0a6edf9220f9c0fce0c54dff76f8b Author: [CST] Focus Date: 2014-07-23 (Wed, 23 Jul 2014) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- lib/xmltree/xmlinterface.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/xmltree/xmlinterface.cpp b/lib/xmltree/xmlinterface.cpp index a1699d612..e8d9792bc 100644 --- a/lib/xmltree/xmlinterface.cpp +++ b/lib/xmltree/xmlinterface.cpp @@ -42,7 +42,8 @@ #else /* USE_LIBXML */ #include "xmltok.h" #endif /* USE_LIBXML */ - +#include +#include 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); + if (posix_fadvise(fileno(xml_file), 0, 0, POSIX_FADV_DONTNEED) != 0) + perror("posix_fadvise FAILED!"); + fclose(xml_file); if (!tree_parser->RootNode())