Mercurial > hg > audiodb
annotate libtests/0026/prog1.c @ 610:e21a3db643af
MORE MEMORY SANITY
Move the logic tracking which points have been visited already
(including the std::set datastructure) into the indexed query codepaths,
rather than inside accumulators. This has the effect of drastically
reducing the memory used in non-indexed queries, such that the working
set for a 500-file database with 100000 vectors total goes from 1.2GB to
slightly under 3MB.
All this and less code, too!
author | mas01cr |
---|---|
date | Fri, 28 Aug 2009 17:14:06 +0000 |
parents | 342822c2d49a |
children |
rev | line source |
---|---|
mas01cr@498 | 1 #include "audioDB_API.h" |
mas01cr@498 | 2 #include "test_utils_lib.h" |
mas01ik@355 | 3 |
mas01cr@498 | 4 int main(int argc, char **argv) { |
mas01cr@498 | 5 adb_t *adb; |
mas01cr@498 | 6 |
mas01cr@498 | 7 clean_remove_db(TESTDB); |
mas01cr@498 | 8 if(!(adb = audiodb_create(TESTDB, 0, 0, 0))) |
mas01cr@498 | 9 return 1; |
mas01ik@355 | 10 |
mas01cr@498 | 11 if(audiodb_power(adb)) |
mas01cr@498 | 12 return 1; |
mas01cr@498 | 13 if(audiodb_power(adb)) |
mas01cr@498 | 14 return 1; |
mas01ik@355 | 15 |
mas01cr@498 | 16 audiodb_close(adb); |
mas01ik@355 | 17 |
mas01cr@498 | 18 return 104; |
mas01ik@355 | 19 } |