Author Topic: Why a single file?  (Read 925 times)

0 Members and 1 Guest are viewing this topic.

Offline cerberos76

  • album.pl User
  • *
  • Posts: 6
  • Karma: +0/-0
  • I forgot to change the default text.
Why a single file?
« on: July 22, 2003, 15:58:02 »
Mike,
I am a perl programmer and was in need of a gallery script for a site. Just looked around and picked a few both perl and phh, just to see what has already been done before writing any code myself....

I installed your script (there is a bug in the installation; if you do it locally it does not recognise the form URL... so it never saves the data... but it is anyway much easier to  write the .cfg file manually!!).

It seems to have loads of features and I really like it. But there is a question I really cannot answer:
-why such a brilliant program is all inside a massive 285 kb perl file? Dn't take it on the wrong side. I love what you did, but why do you keep everything together?
It bogs a server completly down at each request!!!

Have you tried dividing it in 5-6 (or even more..) smaller perl files that are called when needed and share some global variables?
I might give it a try to get it to faster responses and less loading on my server, but I would like your opinion first.

Thanks for the excellent program!


 


Offline Mike Bobbitt

  • album.pl Author
  • Administrator
  • I Spend Too Much Time Here
  • *****
  • Posts: 3381
  • Karma: +35/-2
    • Mike's Development Archive
Re:Why a single file?
« Reply #1 on: July 22, 2003, 21:48:20 »
I've thought about it a number of times, but have never done any performance testing. I probably should.

To be honest, there probably is no real answer to the question of "why." I started with one file, and it has grown to be this gargantuan and I've never broken it up. Partly I guess because updates are so easy: just one file to upload.

I should give it a try and see how it goes though.

Thanks for the feedback.

Cheers