Skip to content
Snippets Groups Projects
Commit b5a0008a authored by Andy Yates's avatar Andy Yates
Browse files

[ENSCORESW-737]. Faster gene tree serialisation.

We now use the preload() function on a GeneTree to fetch lots of info
from the server. Local tests suggest it wins back half a second or so. If anything
it is fewer trips to the server
parent de7ddd37
No related branches found
No related tags found
No related merge requests found
......@@ -16,6 +16,7 @@ sub encode_phyloxml {
$w->cdna(1) if $sequence eq 'cdna';
$w->no_sequences(1) if $sequence eq 'none';
my $gt = $c->stash->{$stash_key};
$gt->preload();
my $root = $gt->root();
$w->write_trees($root);
$w->finish();
......@@ -28,6 +29,7 @@ sub encode_nh {
$stash_key ||= 'rest';
my $gt = $c->stash->{$stash_key};
my $nh_format = $c->request->param('nh_format') || 'simple';
$gt->preload();
my $root = $gt->root();
my $str = $root->newick_format($nh_format);
$root->release_tree();
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment