Long delay in BLI_adddirstrings function
Closed, ArchivedPublic


Group: V 2.32 release
Resolution: Approved
Category: Linux related

Since running version 2.28 to the current cvs version
we have experienced a long delay in accessing the
file system through Blender on our linux machines.
After investigating the problem we discovered the
delay occurred in finding the user's name based upon
their id. Specifically, in the creation of pwtable
by the function BLI_buildpwtable called by
BLI_adddirstrings in the file storage.c.

In our university system we have over 5000 users,
causing a delay of 5-10 seconds to create the
pwtable. This delay occurs every time we access the
file system. Our solution for this problem is given
below. Instead of creating a table of users we use
the following.

struct passwd *pwuser;
pwuser = getpwuid(files[num].s.st_uid);
strcpy(files[num].owner, pwuser->pw_name);

I have also attached the diff file of the current cvs
version and our version (of storage.c). Thank You.


Kent Mein (sirdude) closed this task as Archived.Mar 29 2004, 8:40 PM

This task was automatically closed as archived as part of migration, because the project or tracker this task belonged to is no longer active.