File-Gallery & Browser code
currently not useful if user
has over 100 terms in a vocabulary.

i've tested it with a vocabulary and 3000 terms
in it.
page load was over 20 sec. and 8000 SQL
queries, just to display the top folder and file count.

#669792: file framework works slow
#710354: File Browser sort order

Comments

johanneshahn’s picture

the news query for the count all files in subdiretories with access rights looks awesome :D
From a vocabulary with 3000 terms from 20 sec. to 100 milli sec.

"SELECT COUNT(*) AS count FROM {node_access} AS na
INNER JOIN (
SELECT fn.nid AS nid FROM {file_nodes} AS fn
WHERE nid IN (
SELECT nid
FROM {term_node} tn
INNER JOIN {term_data} td ON tn.tid = td.tid
WHERE tn.tid IN (". implode(',', $alltermids) .")
)
)
res ON res.nid = na.nid
WHERE res.nid $grants_sql AND grant_$op >= 1"

johanneshahn’s picture

Status: Active » Needs review

needs testing by community

srees’s picture

Issue summary: View changes
StatusFileSize
new132.31 KB

This does not appear to be working correctly.

File count is broken at the vocab level, and we don't get file count or size for terms that act as folders anymore. Nodes look ok as far as I can tell.

srees’s picture

StatusFileSize
new7.44 KB

I've written a patch to fix the borked file counts and sizes.

gobinathm’s picture

Status: Needs review » Closed (outdated)

Closing the issue. It was inactive for a long time & it's related to a Drupal Version which is not supported anymore