Hey Wolfgang,
I think the biggest slow-down is when we parse BLAST results and insert hyperlinks to be able to download sequences, i.e, format_blast_results function and those that it calls. Effectively this requires doing regular-expression text searches on each line BLAST outputs. Several thoughts:
- Having fewer results can make a huge speedup (e.g. using an evalue cutoff or max number of reported alignmeents) but obviously users need to be educated appropriately for this kind of thing.
- Whenever we do a replacement, we also write to the log file [a]. If you change the logging level to a more stringent level (or comment out those “log” lines), you would probably get a small speedup.
- Stackoverflow suggests [b] that scanning for BLAST output lines that need changing could be accelered as much as 50% (e.g., [c]), especially with newer ruby versions.
Feel free to re-implement & test and submit a pull request
Cheers!
Yannick
[a]: e.g., lib/sequenceserver.rb line 596
[b]: http://stackoverflow.com/questions/11887145/fastest-way-to-check-if-a-string-matches-or-not-a-regexp-in-ruby
[c]: lib/sequenceserver.rb line 421: if line.match(/^>/) #