Dec 05, 2008 | 03:05 PM  
Welcome

Don't have an account yet? You can create one, it is free, just click here

as a registered user you have some advantages like free downloads, comments and posting on our forums, depending upon this site's configuration and options.

 • •  Control Panel - Register - Login  • • 
Current Stable MDPro Lite 1.0821 Download
  Forum FAQForum FAQ   SearchSearch  UsergroupsUsergroups  PreferencesPreferences  Options forumOptions forum  Watched TopicsWatched Topics  Watched ForumsWatched Forums
Latest forum posts Latest forum posts  Log in to check your private messages Log in to check your private messages    Log inLog in 
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
Logan
New MD user
New MD user


Joined: Oct 24, 2003
Posts: 7

Member
Post  Posted: Jan 07, 2007 - 07:52 AM Reply with quote Back to top
Post subject: scalability issues - if file_exists

I run quite big photoportal based on MD-pro autotheme, pnphpbb2 and smartors album pack.
In album pnphpbb2 module I've changed code not to display images via thumbnails scripts which were checking database than checking whether file exists and than if not resampling thumbnail with code which was first checking whether file exists and than if does not starting thumbnail script. On category page this procedure was performed for each thumbnail - 20 times. With growing number of pictures portal was slower and slower.
Recently I came to the conclusion that this looop if (file_exists ... is unnecesary because it is enough to do it once after uploading photo and resampling thumbnail.
But effect was unbelivable - portal is 2-3 times faster. I think that for each generation of page 20 files was checked and than 20 files loaded - double unnecesary work. Disk making it phisically.

Now I found that during generation of ANY page md-pro and autotheme is performing file_exists check for 30-40 times.

Just change " if (file_exist" and " if (@file_exist" with "echo "x";if (file_exist" in your portal scripts and you will see 30-40 x-es on generated page. And this skips or elseif (file_exist functions (about the same numebr but not all are executed.

I think that it might be very usefull to get rid of those functions in places in which they are unnecesary. That would give extra power to md-pro portal which id very voulnerabe for heavy traffic.

How do you think?
View user's profile Visit poster's website
TiMax
Project Manager
Project Manager


Joined: July 31, 2003
Posts: 1560
Location: Quebec - Canada

Post  Posted: Jan 07, 2007 - 07:58 AM Reply with quote Back to top

We always try to remove unnecesary code, but maybe if it is there is because it need to be there Smile

You can work in this way to optimize YOUR installation, not to use like default release

_________________
TiMaxMAX s.o.s.Fantasia e dinamicità Italiane, qualità e servizi Canadesi Web Services, hosting ed housing professionali
View user's profile Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
Logan
New MD user
New MD user


Joined: Oct 24, 2003
Posts: 7

bannato
Post  Posted: Jan 07, 2007 - 10:11 AM Reply with quote Back to top

Thank you for that fast answer.

Yes your right. I think I will try do do something with this I hope it will give good results.
Those observations also mean that limits in scalability are caused rather by limitation of file system then by processor strenght, what is not a good news for me because I wanted to switch for stronger server - but I don't thing there will be any improvement on file system performance.

Greetings !!!

_________________
Otwarta internetowa galeria foto
View user's profile Visit poster's website
TiMax
Project Manager
Project Manager


Joined: July 31, 2003
Posts: 1560
Location: Quebec - Canada

Post  Posted: Jan 08, 2007 - 04:11 AM Reply with quote Back to top

Try also to use MDLite, it is more fast and need less memory

_________________
TiMaxMAX s.o.s.Fantasia e dinamicità Italiane, qualità e servizi Canadesi Web Services, hosting ed housing professionali
View user's profile Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
Display posts from previous:     
Jump to:  
All times are GMT + 13 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by MDForum 2.0.8© 2003-2007 MAXdev Team
Credits