View Single Post
Old 03-13-2021, 12:20 PM   #17
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,773
Karma: 7029857
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
11 Mar 2021 (in calibre source):
  • Performance improvement of the virtual_libraries() template function

    The performance of the virtual_libraries function has been improved substantially. For example, on my Windows machine using a test database with 3900 books, 15 virtual libraries, and one composite column that calls virtual_libraries(), the performance change is:
    Code:
    First call to virtual_libraries()
                 old = 368,381 μs
                 new = 382,352 μs
    
    Typical time for each call thereafter (once per displayed book), until data changes:
                 old = 165,338 μs
                 new =       1 μs
    Result: scrolling 20 books goes from 3.3 seconds to 20 microseconds.

    On a smaller library of 200 books with 5 virtual libraries the numbers are:
    Code:
    First call to virtual_libraries()
                 old = 7,852 μs
                 new = 7,846  μs
    
    Typical time for each call thereafter, until data changes:
                 old = 195 μs
                 new =  <1 μs
    The performance improvement is directly related to the number of virtual libraries.

Last edited by chaley; 03-13-2021 at 02:12 PM.
chaley is offline   Reply With Quote