jellyfin-kodi/jellyfin_kodi
Chuddah 0a69894320 Attempt to reduce the number of calls to execute and fetchone.
Profiling has shown that there are many calls to sqlite3.execute and
fetchone which takes a signicant amount of time. A simple way of
reducing these is to swap the 2-stage init of table row data into a
unified add.

Applying this to add_set and add_country yielded these results:

Before changes
```
281784    7.054    0.000    7.054    0.000 {method 'execute' of 'sqlite3.Cursor' objects}
127443    1.114    0.000    1.114    0.000 {method 'fetchone' of 'sqlite3.Cursor' objects}
```

After changes
```
281714    7.492    0.000    7.492    0.000 {method 'execute' of 'sqlite3.Cursor' objects}
127373    1.217    0.000    1.217    0.000 {method 'fetchone' of 'sqlite3.Cursor' objects}
```

Note: The total time of fetchone has actually increased. I am hoping
this was an abnormality on my machine and the actual reduction in the
number of calls will permantly reduce this total time.
2020-02-23 18:00:38 +00:00
..
database Removed unnecessary log messages and changed some to debug (#167) 2020-01-05 18:41:26 -05:00
dialogs Initial work on Kodi 19 (and Python 3) support 2020-01-04 03:32:30 +01:00
entrypoint Moved JsonDebugPrinter to existing utils module 2020-02-22 15:04:28 +00:00
helper Moved JsonDebugPrinter to existing utils module 2020-02-22 15:04:28 +00:00
jellyfin Moved JsonDebugPrinter to existing utils module 2020-02-22 15:04:28 +00:00
objects Attempt to reduce the number of calls to execute and fetchone. 2020-02-23 18:00:38 +00:00
__init__.py Begin restructing, fixed some issues related to movement 2019-11-07 22:58:44 +01:00
client.py Removed unnecessary log messages and changed some to debug (#167) 2020-01-05 18:41:26 -05:00
connect.py Initial work on Kodi 19 (and Python 3) support 2020-01-04 03:32:30 +01:00
downloader.py Parallelize multiple http GET requests 2020-02-19 22:18:54 +00:00
full_sync.py Allow for UI updates as the library is being sync'ed 2020-02-18 23:23:47 +00:00
library.py Removed previous fixup. 2020-02-19 23:23:21 +00:00
monitor.py Moved JsonDebugPrinter to existing utils module 2020-02-22 15:04:28 +00:00
player.py Initial work on Kodi 19 (and Python 3) support 2020-01-04 03:32:30 +01:00
setup.py Initial work on Kodi 19 (and Python 3) support 2020-01-04 03:32:30 +01:00
views.py Initial work on Kodi 19 (and Python 3) support 2020-01-04 03:32:30 +01:00
webservice.py Initial work on Kodi 19 (and Python 3) support 2020-01-04 03:32:30 +01:00