mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-26 15:02:50 +02:00
lib/xmltree/xmlinterface.cpp: use posix_fadvise to try reduce cached pages, while loading huge epg data
Origin commit data
------------------
Branch: ni/coolstream
Commit: f15e5eeb39
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2014-07-23 (Wed, 23 Jul 2014)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -42,7 +42,8 @@
|
||||
#else /* USE_LIBXML */
|
||||
#include "xmltok.h"
|
||||
#endif /* USE_LIBXML */
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
|
||||
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())
|
||||
|
Reference in New Issue
Block a user