Skip to content
This repository was archived by the owner on Aug 12, 2020. It is now read-only.

High memory usage #48

Closed
Arthedian opened this issue Jan 8, 2014 · 12 comments
Closed

High memory usage #48

Arthedian opened this issue Jan 8, 2014 · 12 comments

Comments

@Arthedian
Copy link

When I upload files to server it increases memory usage a lot even when I upload small files. Even when I close and reopen webpage, the memory usage is still high, even if i uploaded five small files on server. Is the problem on my side?? How can I Repair it? I didn’t change the example yet. I am using django 1.6 branch.

@Arthedian
Copy link
Author

I think, it is done by scaling picture. I am talking about client-side RAM

@sigurdga
Copy link
Owner

sigurdga commented Jan 9, 2014

Which browser? Is this memory consumption any worse than other websites that do this kind of scaling? Will the problem be the same at the upstream project by blueimp? http://blueimp.github.io/jQuery-File-Upload/

@Arthedian
Copy link
Author

I dont know the comparison to other site.
this is with your server (http://blueimp.github.io/jQuery-File-Upload/)
Firefox - High Usage is only when I add file, than its as ussual
Chrome - when i uploaded 8 file the comsuption of Ramn was 430 MB
Its not that high like in my local server so its weird, I am trying to upload 5k x 7K pixels images, so i think its problem with that.
And with my server the deleting of image from server doesnt help.

@Arthedian
Copy link
Author

I think its bug in Chrome, because in FF its OK (its only on the beginning). I think the way out from this situation is to create on upload an resized small image on the server. Is it possible?

@ET-CS
Copy link
Collaborator

ET-CS commented Jan 20, 2014

look at this earlier fork https://github.com/theskumar/django-jquery-file-upload.
he implemented in commits 8b1d396 & ef36a6d such resizing functionality.

@Arthedian
Copy link
Author

I tryed to implement it here, but without success, when i upload I only get Internal error, does anyone know why? Arthedian@c821880

@ET-CS
Copy link
Collaborator

ET-CS commented Jan 22, 2014

Did you installed django-imagekit and PIL or Pillow?
https://github.com/matthewwithanm/django-imagekit

@Arthedian
Copy link
Author

yes i have Pillow and django-imagekit by pip

@Arthedian
Copy link
Author

i done this yeah!!!! in this commits: Arthedian@c821880 Arthedian@6b676a1 Arthedian@63354a8 Arthedian@ed4c6d2 . You can add it to this project if you want (only Django 1.6 branch), but now i have another problem. When i move this to my project, where i change the URL for list of already uploaded images? (default is "upload/view/")

@sigurdga
Copy link
Owner

sigurdga commented Feb 5, 2014

Great to see that you got it working!

The server is doing the url matching based on the contents of the 'urls' files. You have a project level 'urls' and an app level urls in 'fileupload/urls'. This is pretty standard Django. However I don't remember if we are hardcoding the url in the javascript files. You could find out by grepping for /upload/view in the javascript files.

@sigurdga sigurdga closed this as completed Feb 5, 2014
@Arthedian
Copy link
Author

it is hardcoded in main.js

@sigurdga
Copy link
Owner

sigurdga commented Feb 6, 2014

@Arthedian Ok. Thanks for keeping your implementation in the open, so we can merge it or be heavily influenced if or when we want this functionality.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants