[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
Wed Jul 22 07:49:19 CEST 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15851

David Cook <dcook at prosentient.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dcook at prosentient.com.au

--- Comment #46 from David Cook <dcook at prosentient.com.au> ---
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 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. 

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 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.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list