From 6f34f2f2d9a4abf4e7824ea22034fa447ac2cbbc Mon Sep 17 00:00:00 2001 From: tibvdm Date: Mon, 22 Apr 2024 16:50:00 +0200 Subject: [PATCH] timings --- app/controllers/mpa/pept2filtered_controller.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/controllers/mpa/pept2filtered_controller.rb b/app/controllers/mpa/pept2filtered_controller.rb index d9411f3..2ba0139 100644 --- a/app/controllers/mpa/pept2filtered_controller.rb +++ b/app/controllers/mpa/pept2filtered_controller.rb @@ -24,16 +24,15 @@ def pept2filtered # Request the suffix array search service @response = search(peptides, equate_il, cutoff) .select { |result| !result["cutoff_used"] } - .each { |result| result["taxa"] = result["taxa"].to_set } end_index_time = get_time - index_time filter_time = get_time - taxa_filter_ids.to_set + taxa_filter_ids = taxa_filter_ids.to_set @response.each do |result| - result["taxa"] = result["taxa"] & taxa_slice + result["taxa"] = result["taxa"].to_set & taxa_filter_ids end end_filter_time = get_time - filter_time