[Haiku-commits] r28872 - haiku/trunk/src/kits/tracker
aldeck at BerliOS
aldeck at mail.berlios.de
Sun Jan 11 04:08:57 CET 2009
Author: aldeck
Date: 2009-01-11 04:08:56 +0100 (Sun, 11 Jan 2009)
New Revision: 28872
ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=28872&view=rev
Modified:
haiku/trunk/src/kits/tracker/PoseView.cpp
Log:
* The pose adding thread was going too fast, opening too many files (those are closed by the window thread), and
reaching the file descriptor limit. For some still unknown reason, this was causing GetNextDirents to stop returning new
entries. The result was that, on populated folders, Tracker wouldn't load all poses and stop at a random amount.
We now take a more conservative approach and close the files before sending, reopening them on reception.
Now the AddPoses thread is a bit too aggressive, especially on second runs, i needed to add some snoozing otherwise it
would stall Tracker for several seconds. (testing on a 20000 files folder).
This fixes #3054
Modified: haiku/trunk/src/kits/tracker/PoseView.cpp
===================================================================
--- haiku/trunk/src/kits/tracker/PoseView.cpp 2009-01-11 01:40:05 UTC (rev 28871)
+++ haiku/trunk/src/kits/tracker/PoseView.cpp 2009-01-11 03:08:56 UTC (rev 28872)
@@ -1334,6 +1334,7 @@
// probably more correct.
// clean this up
+ model->CloseNode();
modelChunkIndex++;
}
@@ -1359,6 +1360,8 @@
posesResult = new AddPosesResult;
posesResult->fCount = 0;
+
+ snooze(500); // be nice
}
if (!count)
@@ -1613,6 +1616,7 @@
continue;
}
+ model->OpenNode();
ASSERT(model->IsNodeOpen());
PoseInfo *poseInfo = &poseInfoArray[modelIndex];
More information about the Haiku-commits
mailing list