-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initialisation process of the app takes too long and is too memory and CPU hungry as it tries to map all media files found in the system #17
Comments
Solutions explorationFull map
Pros
Cons
Current folder
Pros
Cons
Notes
|
@jancborchardt - Any thoughts on how loading only the current folder affects usability? |
@dbeckmann - Try this branch and let me know how it works for you
|
The performance-fixes branch works like a charm for me ! |
Thanks for the feedback :) |
Oh that was too quick XD But 264 Folders are better than none :) |
OK, so you have more than 250 sub-folders in your view? :-O Check out data/ownloud.log to see if there is anything suspicious. File locking error, preview error, some exception, file not found, etc. Use the Firefox debugger (better than Chrome's) and look for
EDIT: If you have more than 250 folders in your view, you've probably fallen victim to #27 |
Only 635 Folders... Never user Picasa to organize your images :) Lets decrease the owncloud debug level to error, warnings,e.g. and clean the logfile Firefox and Chrome Debugger was okay. The only error message was |
Thanks. I've noticed that your data folder seems to be in a different location that the web server root and that's a configuration that I haven't accounted for. |
Okay I changed the file but no change. I also reconed that the gallery is always printing the whole line. So I thought about a problem with next line of folders. I moved away some, but there was no change. Do I have to clear some cache for Gallery+? The only obvious difference between the folder previous is that there is the first folder which contains some NEF (Nikon Raw) images |
Update: I found the malicious folder. If i move it away, it works fine. But there is no obvious reason why gallery+ fails with the folder. The "normal" OC8 fileviewer is able to create thumbnails. |
Update: default:
// this is mostly file created from encrypted file
$im=imagecreatefromstring(\OC\Files\Filesystem::file_get_contents(\OC\Files\Filesystem::getLocalPath($imagePath)));
if ($im !== false) {
$this->resource = $im;
$iType = IMAGETYPE_PNG;
$this->logger->debug('OC_Image->loadFromFile, Default', array('app' => 'core'));
break;
}
else{
$e = new Exception();
$this->logger->error($e->getTraceAsString(), array('app' => 'core'));
}
}
if ($this->valid()) {
.... Results in following stacktrace #0 /var/www/owncloud/lib/private/preview/image.php(43): OC_Image->loadFromFile('/media/owncloud...')
#1 /var/www/owncloud/lib/private/preview.php(765): OC\Preview\Image->getThumbnail('//Photos/2000.0...', 2048, 2048, false, Object(OC\Files\View))
#2 /var/www/owncloud/lib/private/preview.php(516): OC\Preview->generatePreview(146349)
#3 /var/www/owncloud/apps/galleryplus/preview/preview.php(196): OC\Preview->getPreview()
#4 /var/www/owncloud/apps/galleryplus/preview/preview.php(128): OCA\GalleryPlus\Preview\Preview->getPreviewFromCore(false)
#5 /var/www/owncloud/apps/galleryplus/service/previewservice.php(142): OCA\GalleryPlus\Preview\Preview->preparePreview(200, 200, false)
#6 /var/www/owncloud/apps/galleryplus/controller/servicecontroller.php(307): OCA\GalleryPlus\Service\PreviewService->createPreview('Photos/2000.02....', 200, 200, false, true)
#7 /var/www/owncloud/apps/galleryplus/controller/servicecontroller.php(262): OCA\GalleryPlus\Controller\ServiceController->getPreview('Photos/2000.02....', 200, 200, false, false, true)
#8 /var/www/owncloud/apps/galleryplus/controller/servicecontroller.php(192): OCA\GalleryPlus\Controller\ServiceController->getThumbnail('Photos/2000.02....', true, true)
#9 [internal function]: OCA\GalleryPlus\Controller\ServiceController->getThumbnails('Photos/1. Mai/D...', true, true)
#10 /var/www/owncloud/lib/private/appframework/http/dispatcher.php(158): call_user_func_array(Array, Array)
#11 /var/www/owncloud/lib/private/appframework/http/dispatcher.php(86): OC\AppFramework\Http\Dispatcher->executeController(Object(OCA\GalleryPlus\Controller\ServiceController), 'getThumbnails')
#12 /var/www/owncloud/lib/private/appframework/app.php(97): OC\AppFramework\Http\Dispatcher->dispatch(Object(OCA\GalleryPlus\Controller\ServiceController), 'getThumbnails')
#13 /var/www/owncloud/lib/private/appframework/routing/routeactionhandler.php(44): OC\AppFramework\App::main('ServiceControll...', 'getThumbnails', Object(OC\AppFramework\DependencyInjection\DIContainer), Array)
#14 [internal function]: OC\AppFramework\routing\RouteActionHandler->__invoke(Array)
#15 /var/www/owncloud/lib/private/route/router.php(250): call_user_func(Object(OC\AppFramework\routing\RouteActionHandler), Array)
#16 /var/www/owncloud/lib/base.php(763): OC\Route\Router->match('/apps/gallerypl...')
#17 /var/www/owncloud/index.php(36): OC::handleRequest()
#18 {main} My php skills are limited, so I'm not sure if it is an OC8 error or a Gallery+ problem. |
Thanks for the logs :)
Check the folder
To see it's that's the problem, you can move or delete that folder ( |
Okay, how do I get the fileId ? But I think this is not the problem anymore. I definitely found the files which are creating the problems. If I delete them, everything works find. But the main problem seem to be, that we are not checking whether the file is a valid image resource (somewhere in the above stack trace). |
It will be easier to get the fileId with the next version, but in the mean time, you can find it in the HTML, on the Files app side. And I agree. Ideally, the app should be able to survive such failure, but the problem is that most of these problems are in Best thing to do is to report those issues in
|
@timmmmmey @oparoz did the issues get reported to core? I can reproduce (after installing this branch my logs are full of errors :D ) and that suggests to me these should be fixed before gallery+ can be a viable successor to the current gallery app - and I like it to be as it looks prettier and we all like pretty things 🎱 |
@jospoortvliet - Not reported yet I think. I agree these should be fixed, but since I don't think they're blocking the execution, they will have a low priority, like this one: owncloud/core#14036 The next release of the app should be able to handle these issues more gracefully, but it's difficult to test all possible use cases. |
Well, this release (8.1) would focus on performance and stability so this kind of stuff sounds like good candidates for some love and attention... |
@dbeckmann - Check out |
Gallery+ App does not scale
Similar to the original version - as in this issue, the gallery app still does not scale. There are over 100,000 images on the server, and very quickly after opening the main app page, the 512MB of memory allowed to PHP are exhausted. The same "searchByMimes" is still used to initialize the gallery as in the previous version, and as is noted in the comments in service/infoservice.php, it "can lead to performance issues", or it may fail entirely.
The text was updated successfully, but these errors were encountered: