Opened 6 years ago

Closed 4 years ago

#1079 closed defect (fixed)

I2PSnark directory listing is slow

Reported by: zzz Owned by: zzz
Priority: trivial Milestone: 0.9.23
Component: apps/i2psnark Version: 0.9.8.1
Keywords: performance Cc:
Parent Tickets: Sensitive: no

Description

I2PSnarkServlet.getListHTML() iterates through the files in the directory, not the files in the torrent, and then calls Storage.remaining() which iterates through the files in the torrent, thus O(n2) and noticeable in big directories (500+).

Can we collapse this? getListHTML() was adapted from Jetty to display a directory. Do we need to report on unknown files in the directory or can we just report on the torrent files directly?

Subtickets

Change History (2)

comment:1 Changed 5 years ago by str4d

Keywords: performance added
Milestone: 0.9.12

comment:2 Changed 4 years ago by zzz

Milestone: 0.9.23
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.