[#427] docman wastes a lot of memory

Description

Summary:

Detailed description

If a file is uploaded, the file content is loaded into a PHP variable. Then a function is called that creates a Document object. This function call creates the first internal copy of this variable. Within this function Document->create there are at leat two more internal copies (data1 and base64_encode(data)) of this data created. The the DB is call, which creates the next copy. So to upload a 100 MB file. Docman needs at least 500M main memory. This should be optimized.

General Information
Submitted by:
Michael Kluge
Date Submitted: 2012-05-22 12:48
Last Modified by: Nobody
Last Modified: 2017-11-02 20:00
Date Closed: 2012-08-26 10:19
Permalink: https://fusionforge.org/tracker/a_follow.php/427
Actions
Internal Fields
Data Type: Bugs
Assigned to: Franck Villaume (nerville)
State: Closed
Priority: 3
Extra Fields
Resolution:
Fixed
Severity:
major
Target Release:
5.3
Follow-up tabs
Message  ↓
Date: 2012-08-26 10:19
Sender: Franck Villaume

test done with current trunk : memory limit set to 128M. Max upload size is 80M. I close the case.

Date: 2012-06-26 19:31
Sender: Michael Kluge

No, not really. I can't test the new code within my 5.1 installation because I also had to replace some files from the 'common' dir which would break it ... The testcase was a php memory limit of 128 MB and a 70 MB pdf that needed to be put into docman. If that works for you in your test environment, I think the case can be closed.

Date: 2012-06-26 18:08
Sender: Franck Villaume

any update on this topic ?

Date: 2012-06-03 16:01
Sender: Franck Villaume

in trunk, docman now stores files in the filesystem. no more base64_encode(data) lot of memory saved. take a look at r15660

Date: 2012-05-23 05:51
Sender: Michael Kluge

Hard to give a valueable feedback. I copied the new code into my 5.1 infrastructure and the script still goes to nirvana if I upload a 70M file. The php memory limit is set to 256M. So it is either still using a lot on memory or something is wrong with the 5.1/trunk mix I used for the test. I have'nt much done with php in terms of debugging the memory consumption, so it might take some time until I can give a better feedback.

Date: 2012-05-22 22:32
Sender: Franck Villaume

please take a look at r15547 in trunk.

Date: 2012-05-22 20:37
Sender: Franck Villaume

agreed. some enhancements are in their way but targeted to trunk.

No attached documents

No related commits.

Field Old Value Date By
Severitynormal2012-08-26 10:19
Franck Villaume
ResolutionNone2012-08-26 10:19
Franck Villaume
status_idOpen2012-08-26 10:19
Franck Villaume
close_dateNone2012-08-26 10:19
Franck Villaume
Target Releasetrunk2012-05-22 22:32
Franck Villaume
assigned_tonone2012-05-22 22:32
Franck Villaume
Target ReleaseNone2012-05-22 22:32
Franck Villaume

No relations found.