Quote:
Originally Posted by un_pogaz
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.