Forum OpenACS Development: Re: Scalability of get_path (PG) and the file-storage package

Don,

You made me realize (not exactly realize perhaps - you've made me think - it's getting late here you see) that there shouldn't necessarily be a need to calculate the path for each file that is listed in "folder chunk". Why calculate it a hundred times (in your example) when it probably could be done just once: when you click on a file.

It ought to suffice to have the listed file's url contain the version_id, or better, item_id of the file. Then feed that to get__path and do an internal redirect or whatever is needed to the returned path to make the finishing page have the proper url in the address field of the browser ...

Is that what you figured, Don?

I think we could save a lot of precious cycles by rethinking this.

Oh well, I will have to think about this in the morning.

(Hmm. Don "the data generator" Baccus. That is a cool nickname 😊

/Ola