eitd: as long as neutrino using only first content classification,

reduce content classification caching (leaving old code with ifdef)
This commit is contained in:
[CST] Focus
2015-01-30 19:47:30 +03:00
parent ae6a5e6917
commit e8700de2b7
8 changed files with 84 additions and 2 deletions

View File

@@ -439,10 +439,15 @@ void *insertEventsfromFile(void * data)
}
if (!contentClassification.empty()) {
#ifdef FULL_CONTENT_CLASSIFICATION
ssize_t off = e.classifications.reserve(2 * contentClassification.size());
if (off > -1)
for (unsigned i = 0; i < contentClassification.size(); i++)
off = e.classifications.set(off, contentClassification.at(i), userClassification.at(i));
#else
e.classifications.content = contentClassification.at(0);
e.classifications.user = userClassification.at(0);
#endif
}
addEvent(e, 0);
ev_count++;