Getting package versions via dpkg-query on startup is very expensive
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical System Image |
Fix Released
|
High
|
Alejandro J. Cura | ||
unity-scopes-shell (Ubuntu) |
Fix Released
|
High
|
Paweł Stołowski |
Bug Description
The plugin executes dpkg-query on startup to get version numbers of 3 important packages (scopes-api, unity8, self). They are then passed to Smart Scopes Server with every request. Using dpkg-query at this stage seems to have big impact on startup time of the Dash (and phone).
Michael Vogt suggested a simple postinst/postrm script that is executed for all 3 packages to put & update their versions via a flat text file, e.g.
::::::::::::::
debian/postinst
::::::::::::::
#!/bin/sh
set -e
if [ "$1" = "configure" ]; then
dpkg-query -W -f'${Version}' $DPKG_MAINTSCRI
> /var/lib/
fi::::::::::::::
debian/postrm
::::::::::::::
#!/bin/sh
set -e
rm -f /var/lib/
Related branches
- PS Jenkins bot (community): Needs Fixing (continuous-integration)
- Marcus Tomlinson (community): Approve
-
Diff: 164 lines (+48/-60)5 files modifieddata/CMakeLists.txt (+4/-1)
debian/rules (+1/-1)
debian/unity-plugin-scopes.install (+1/-0)
src/Unity/scopes.cpp (+42/-57)
src/Unity/scopes.h (+0/-1)
Changed in unity-scopes-shell (Ubuntu): | |
status: | New → Confirmed |
Changed in unity-scopes-shell (Ubuntu): | |
assignee: | nobody → Pawel Stolowski (stolowski) |
Changed in unity-scopes-shell (Ubuntu): | |
importance: | Undecided → High |
Changed in unity-scopes-shell (Ubuntu): | |
status: | Confirmed → In Progress |
Changed in canonical-devices-system-image: | |
importance: | Undecided → High |
status: | New → In Progress |
assignee: | nobody → kevin gunn (kgunn72) |
milestone: | none → ww46-2015 |
Changed in canonical-devices-system-image: | |
assignee: | kevin gunn (kgunn72) → Alejandro J. Cura (alecu) |
Changed in unity-scopes-shell (Ubuntu): | |
status: | In Progress → Fix Released |
Changed in canonical-devices-system-image: | |
status: | In Progress → Fix Committed |
Changed in canonical-devices-system-image: | |
status: | Fix Committed → Fix Released |