[Koha-bugs] [Bug 15851] "Analytics: Show analytics" showing regardless of whether they have analytics
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Mon Jul 27 22:35:48 CEST 2020
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15851
--- Comment #47 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
(In reply to David Cook from comment #46)
> I was wondering what kind of performance impacts this would have on a large
> database with lots of analytics, but a code review shows that it looks good
> enough (depending on your views).
>
> Looking at C4::Search::SimpleSearch, we're passing an offset of 0 and
> max_results of 0, which generates a range of 1..0 which is nothing, so no
> records are actually fetched from Zebra.
>
> It's not very elegant, but it should be functional, even for a large
> database.
I take it as a compliment-ish comment, thanks :-P
> I tested an unrelated search using yaz-client on a very large database (over
> 1 million bib records), and for a query with 17626 hits, it took .432
> seconds.
Can you give me the query so I can try on my databases as well?
> For some people, adding .432 seconds to web page load time is unacceptable,
> but I imagine most of us might not care too much.
I'd agree. We could make it an opt-in feature? PreciseAnalyticsLink or smth.
> I'd argue that this lookup should be performed asynchronously after the HTML
> page has loaded.
>
> The MARC data could trigger whether to show an "Analytics" label I suppose,
> and then the result of the async lookup would say something like "Show
> Analytics" or "None" or something like that.
>
> Anyway, that's just a thought. I'm not interested in doing any work on this.
> I'm just always interested in performance.
>
> The current patches are fine, so I'm not being critical, but I think an
> optimization would be to do an async lookup.
I like the idea. Will draft an endpoint for fetching such information using the
exact queries we use here.
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list