PhotoPost Community

PhotoPost Community (http://www.photopost.com/forum/)
-   Classifieds Bug Reports (http://www.photopost.com/forum/classifieds-bug-reports/)
-   -   Big issues with PPC and Cloud files (http://www.photopost.com/forum/classifieds-bug-reports/147126-big-issues-ppc-cloud-files.html)

jtorral December 10th, 2011 12:34 PM

Big issues with PPC and Cloud files
 
Ok,

So, I have photopost and photopost classifeds running on my site. Both apps share EVERYTHING, and that means same web server, same file systems and even the same amazon cloud bucket.

I am using s3fs fuse cloud system mounted to an amazon cloud bucket. I have 288,000 images in photopost and when I access them via the app which reads offf of the amazon cloud, the response is acceptable considering what it has to do. No issues there. It takes 3 seconds to load the index page. Not the best but acceptable considering its a cloud.

However, the photopot-classifieds which from the looks of if is very similar to photopost, the page loads take 30 seconds to load and there are only 1200 images in that bucket as apposed to 288,000.

I have gone through the code and the issue is inside of the function get_imagethumb function.

Furthermore, as a side note, the calls to the function dirsize kill the system . I modifieed it just return 1. This is a bad thing with cloud files.

Does the latest version of the classifieds still use similar logic? Is there a work around for using cloud files besides the s3fs?

Thanks

jtorral December 10th, 2011 03:43 PM

narrowed it down to a call to getimagesize which is a big overhead with a cloud

Chuck S December 10th, 2011 04:21 PM

The photopost pro and classifieds code is highly identical you can try commenting out these lines in the function get_imagethumb in classifieds pp-inc.php but not sure what would be affected since I have not tried this

Code:

Content visible to verified customers only.
There should be no issues running a getimagesize on 12 images at a time on a server or even double that so not sure why you would have an issue.

jtorral December 10th, 2011 11:04 PM

Yeap. getimagesize is a real killer. drastically improves when its not called.

Now for another issue with getimagesize.

When uploading images to an ad, getimagesize is called to identify the image type. ie. jpg, gif ... The problem in the function create_thumb is that you call the getimagesize against the file on the server instead of the tmp file name created by php in /tmp. I woud like to change this to get the info from the uploaded file before it is saved as the target file but cannot find in the code where this is. This would be much more efficient than issuing get and post commands that cloud files use since those tmp files are local. any help would be appreciated. and future stats gathering from images maybe can be gathered from the uploading process rather then the destination file.

Thanks

Chuck S December 11th, 2011 08:37 AM

There is nothing wrong with the code it is simply how it is done. There is no temp file. We throw the uploaded file into the uploads directory and then process those pictures and they are moved into the data folder. Your calling getimagesize in create_thumb against the $filepath variable. Filepath is simply the users uploads directory and filename. You need to actually call getimagesize against an actual true file to get info from this is how it works.


All times are GMT -5. The time now is 03:07 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97