mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 10:16:11 +00:00
0a69894320
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. |
||
---|---|---|
.. | ||
database | ||
dialogs | ||
entrypoint | ||
helper | ||
jellyfin | ||
objects | ||
__init__.py | ||
client.py | ||
connect.py | ||
downloader.py | ||
full_sync.py | ||
library.py | ||
monitor.py | ||
player.py | ||
setup.py | ||
views.py | ||
webservice.py |