> I've installed GNU ghostview V 1.5 in our AFS cell. When
> opening a file, ghostview opens a dialog box which offers
> a kind of history mechanism, showing the content of 
> the last two  directories. Ghostview seems to read in
> *all* information about the files. This leads to the
> following problem:
> 
> If the path shown in Ghostview includes /afs/..., 
> Ghostview tries to obtain information for all mounted
> cells ... This results in an enormous slow down; work
> is no longer possible. Once one have reached a directory
> which is deep enough to not include /afs/... performance
> is ok.
> 
> Does anyone have already solved this? I would appreciate
> any help. (One idea is to make a directory, say /afs/cells
> which includes all cell mount points.)

I just got around to solving this problem.  The solution is to
modify the file selector to assume all of the entries in the
/afs directory are directories and avoid doing a stat on them.

Here is the long awaited patch:

*** 1.4 1993/07/24 02:29:12
--- Draw.c      1995/05/02 22:14:33
***************
*** 272,278 ****
                last = strlen(entry->real) - 1;
                entry->real[last] = 0;
                entry->statDone = 1;
!               if (
                        (!stat(entry->real, &statBuf))
  
  #ifdef S_IFLNK
--- 272,280 ----
                last = strlen(entry->real) - 1;
                entry->real[last] = 0;
                entry->statDone = 1;
!               if (strcmp(SFcurrentPath, "/afs/") == 0) {
!                       entry->real[last] = '/';
!               } else if (
                        (!stat(entry->real, &statBuf))
  
  #ifdef S_IFLNK
*** 1.6 1993/07/24 02:29:12
--- Path.c      1995/05/02 22:15:08
***************
*** 806,813 ****
--- 806,823 ----
        char            *str;
        int             last;
        struct stat     statBuf;
+       char            save;
  
        result = 0;
+ 
+       save = *(dir->path);
+       *(dir->path) = 0;
+ 
+       if (strcmp(SFcurrentPath, "/afs/") == 0) {
+               *(dir->path) = save;
+               return result;
+       }
+       *(dir->path) = save;
  
        from = dir->vOrigin;
        to = dir->vOrigin + SFlistSize;

...Tim

          Tim Theisen            Associate Researcher
Internet: [EMAIL PROTECTED]  Department of Computer Sciences
    UUCP: uwvax!ghostview        University of Wisconsin-Madison
   Phone: (608)262-0438          1210 West Dayton Street
     FAX: (608)262-9777          Madison, WI   53706-1685

Reply via email to