Download & Extend

Issues with very large files attached to nodes

Project:Web File Manager
Version:5.x-2.10
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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.

Comments

#1

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

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

#3

Version:5.x-2.9» 5.x-2.10
Status:active» fixed

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

#4

Status:fixed» closed (fixed)

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