View Single Post
Old 11-05-2023, 06:30 AM   #77
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: 12,469
Karma: 8025600
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by un_pogaz View Post
To Kovid, that was possible to implemente a unique button as a cell (button of we modified properties dynamically according to the note it represents), or that is still to much bad regardless the perfomance?
There were two performance problems:
  • creating many thousand pushbuttons in Qt is slow. Each cellWidget had 3. A user-provided test library had 36,000 author rows, or 100,000 buttons.
  • cellWidgets are themselves very slow. I had read about that problem when doing the initial implementation but didn't test with a library big enough to run into the problem. Doing the beta fixed that oversight.
The performance problems can in theory be eliminated by using a styledItemDelegate instead of cellWidgets and drawing the buttons instead of creating button widgets. However, that seems to require writing the delegate in C++, which requires rebuilding calibre's binary for every test. This wasn't something I wanted to try.

Kovid's "checkbox" solution is performant, purely in python, and easy to understand. With a context menu offering create/edit, delete, import, and export (which exists) it works well enough.
chaley is offline