Forum OpenACS Q&A: creation of ziped text file from database...

Request notifications

I have the 3.2.5 survsimp module running on my plattform... I have a
survey that has reached ~2000 Answers on 50 Questions! It is a pretty
tough job for the db!

I wrote a page called special survey that displays all anwers in a
html table, so that users can cut and paste it into some statistics
programm... But the file is around 5mb large and crashes every browser...

I would need a button on /survsimp/admin/one.tcl that allows the
download of a comma seperated txt file (html would be way larger...)
which would be generated on the fly from the db and automatically
compressed (zip for Windows users...)

Any solutions or parts of a solution?

Before doing that I would see how much space rl_returnz buys you. This is a drop-in replacement for ns_return that auto-gzips content. All modern browsers support content-encoding=gzip, and gzip does a better job than zip ("deflate") anyway.
Posted by Don Baccus on
Should we include this in OpenACS 4?  The templating system could be given a parameter telling it whether to return gzip'd content or uncompressed content (the default being uncompressed).

I wouldn't put this in the beta branch but we could add it to the development branch.

What do folks think?  Anyone want to volunteer to add the necessary parameter and patch to the template package?

Posted by Petru Paler on

rl_returnz is actually pretty stable ( is running it since quite a while ago with no trouble) and I'd recommend enabling it by default if you make it configurable. It would give first-time OpenACS users a nice "wow, this thing is fast!" feeling :)

I don't think this solves David's problem though, because the browsers crash/hang when trying to rendering the 5Mb HTML, not when downloading it.

We have been using rl_returnz with AOLserver 3.3+ad13, ACS 4.2 Tcl/Oracle since a day or two after Jim Wilcoxson released his rlreturnz module for AOLserver, and it's worked out great.