1
0
Fork 0
forked from len0rd/rockbox

Fixed performance problems when initializing tagcache.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10754 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Miika Pekkarinen 2006-08-26 09:24:20 +00:00
parent 7c13843805
commit 6523ba44a9
2 changed files with 16 additions and 1 deletions

View file

@ -567,6 +567,7 @@ static int dircache_do_rebuild(void)
memset(fd_bindings, 0, sizeof(fd_bindings));
for (i = 0; i < fdbind_idx; i++)
dircache_bind(fdbind_cache[i].fd, fdbind_cache[i].path);
fdbind_idx = 0;
if (thread_enabled)
{
@ -641,7 +642,7 @@ int dircache_build(int last_size)
if (last_size > DIRCACHE_RESERVE && last_size < DIRCACHE_LIMIT )
{
allocated_size = last_size + DIRCACHE_RESERVE;
dircache_root = (struct dircache_entry *)buffer_alloc(allocated_size);
dircache_root = buffer_alloc(allocated_size);
thread_enabled = true;
/* Start a transparent rebuild. */