Issues with very large files attached to nodes

Ben E - April 11, 2008 - 12:34
Project:Web File Manager
Version:5.x-2.10
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

I am experiencing two problems when attaching very large files to a node with WebFM.

I have a node with 9 files attached, half of which are over 150Mb, the rest 30-60Mb. Once the files are attached, the page load time viewing the node leaps from half a second or so to 16 seconds. Using devel module, there is no sign of any database query taking a particularly long time, with the total for all db queries under 100ms. But the total page generation time is reported as > 16000ms. Memory usage seems to be about normal.

The second problem is that if I unpublish the node, all the attached files are detached from the node again.

This only happens with large files: if I attach a series of small files to the node, page loading times are normal, and the files remain attached if the node is unpublished.

#1

robmilne - April 12, 2008 - 23:20

OK, I've spent most of the day looking at this. I never did much testing with very large files but I can see your point now that I have. Turns out the culprit is a getimagesize($file) call at line 2033 of webfm.module. I've removed and put the icon detection solely on the js side. Much much faster directory listing now. While I was at it I decided to terf the file_move func from core file.inc since it does a copy/delete rather than a rename - very slow for large files. I haven't had time to look at the second issue yet.

Anyway, with some cleanup, etc. I will release a 2.10 very soon.

#2

robmilne - April 12, 2008 - 23:28

The same func call was also screwing up attachment. I've removed and I think all is well with attachment of big files.

#3

robmilne - April 13, 2008 - 20:58
Version:5.x-2.9» 5.x-2.10
Status:active» fixed

I've modified the version to indicate where the fix applies.

#4

Anonymous (not verified) - April 27, 2008 - 21:12
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.