menu

Directory Lister

Directory Lister is the easiest way to share the contents of any web-accessible folder and navigate there within.

Channels
Team

Why is the TTFB so damn high?

July 16, 2020 at 7:56pm

Why is the TTFB so damn high?

July 16, 2020 at 7:56pm (Edited 3 months ago)
i disabled cache both in config, htaccess and server side, still there is no reason that the site takes 5s to load?! (Waiting TTFB 5.6s) is this normal or is there a bug here? also, if i use a session_start() in the index.php, by default the site will take long to load. why?? would welcome some answers. this baffles me. directory lister 1&2 where so easy to use.. (no, its not a server sided problem, i have a fast web server)

July 16, 2020 at 8:02pm
First, what version of Directory Lister are you using? Also, what version of PHP?
Are you listing a large number of files/folders in a single directory?
Edited
  • reply
  • like

July 17, 2020 at 7:09am
First, what version of Directory Lister are you using? Also, what version of PHP?
Are you listing a large number of files/folders in a single directory?
hi and thank you for the reply
im using directory lister 3.3.0 and php 7.4.8 im currently listing 320 folders in a single directory. 17gigabyte files in total
when i have caching on the site runs fast, but i turned it off because i want to show real time list of folders/files (due to uploads from multiple ftp users)
regardless of the caching issue; if i put session_start() in the directorylister - index.php the site will load very slow and i do not know why..
Edited
  • reply
  • like

July 17, 2020 at 7:40pm
Caching shouldn't affect the files listed. The only things cached are calculated file hashes, zip files, translation definitions and parsed markdown.
320 files isn't a small number but doesn't seem THAT big either. I'll have to do some testing with a large number of files and see if I can reproduce this.
What are you trying to accomplish with session_start()?
Edited
  • reply
  • like

July 18, 2020 at 7:54am
thanks for the reply chris
it is all due to the disabling caching in the .htaccess file. if i remove it (the htaccess file), site loads very well and fast. apparently only at the first loading it takes 5s. if i use caching, the result (directory listing) is stored. however, if a folder/file is added, the change is not being displayed to the user for several minutes. hence my approach of disabling caching to show real time folders/files list.
this is my simple htaccess file <IfModule mod_headers.c> Header set Cache-Control "no-cache, no-store, must-revalidate" Header set Pragma "no-cache" Header set Expires 0 </IfModule>
i use php sessions for user login system and hidden file list (different files show for different user classes). if i put a session_start() in the index.php, the site will take very long to load. right now i use cookies instead.
  • reply
  • like

July 18, 2020 at 5:52pm
This sounds like an issue with Apache to me. Might want to check your configuration.
  • reply
  • like

July 21, 2020 at 1:11am
I just added the following immediately after the open_basedir locally and it worked fine (no long loading times).
session_start(['save_path' => __DIR__ . '/app/cache/sessions']);
Edited
  • reply
  • like