diff options
author | bnicholes <bnicholes@13f79535-47bb-0310-9956-ffa450edef68> | 2003-02-07 18:02:04 +0000 |
---|---|---|
committer | bnicholes <bnicholes@13f79535-47bb-0310-9956-ffa450edef68> | 2003-02-07 18:02:04 +0000 |
commit | 18de676a9efcc9b0cb0da2410ad15d4e8f63a670 (patch) | |
tree | 8a337c9f1787944bd9b906b3624bdcee4a1bd3e6 /misc | |
parent | 900ab0c704075ee96d634714d523e712ca27d84f (diff) | |
download | libapr-18de676a9efcc9b0cb0da2410ad15d4e8f63a670.tar.gz |
Performance enhancement by trying to create and cache path contexts so
that getstat() doesn't have to do so much work when trying to traverse a file
path. This has shown a significant speed increase when stat'ing longer file
paths.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64338 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'misc')
-rw-r--r-- | misc/netware/libprews.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/misc/netware/libprews.c b/misc/netware/libprews.c index bf872c44e..b40ffa59c 100644 --- a/misc/netware/libprews.c +++ b/misc/netware/libprews.c @@ -14,6 +14,7 @@ #include "novsock2.h" #include "apr_pools.h" +#include "apr_private.h" /* library-private data...*/ @@ -144,6 +145,28 @@ int DisposeLibraryData(void *data) return 0; } +int setGlobalPool(void *data) +{ + APP_DATA *app_data = (APP_DATA*) get_app_data(gLibId); + + NXLock(gLibLock); + + if (app_data && !app_data->gPool) { + app_data->gPool = data; + } + + NXUnlock(gLibLock); + return 1; +} + +void* getGlobalPool() +{ + APP_DATA *app_data = (APP_DATA*) get_app_data(gLibId); + if (app_data) { + return app_data->gPool; + } + return NULL; +} |