opening a drawer is very slow

Bug #1089990 reported by Jan Schürmann
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Drawers
In Progress
Medium
icb410

Bug Description

ubuntu 12.10 64-bit with the latest updates and Drawers installed running on a Quad-Core with 8GB RAM

when left clicking on a drawer it needs up to 20 seconds to open the window depending on the number of applications in the drawer.
if the drawer has "only" 15 applications in it, it still needs 5 seconds to open up

Revision history for this message
icb410 (ian-berke) wrote :

Thanks for the bug report... I know speed gets worse with more items and it's something I've been thinking about trying to clean up and optimize the code. However, that seems excessive. I have a drawer with 22 items that only takes 1s to display and I think my laptop has similar specs to your system. Another with 45 items takes ~1s. I have noticed that some times the same drawer opens faster than other times. Does it always seem to take so long for you?

The most significant slow down I've seen is a drawer with the entire contents of my /usr/share/applications directory. With 279 items it takes 40-50s. I suspect it may have to do with the types of icons that are loaded and I'll have to investigate that.

I will do some more extensive and methodical testing of times to load different drawers and see if I can pinpoint the bottleneck.

Changed in drawers:
importance: Undecided → Medium
status: New → Triaged
assignee: nobody → icb410 (ian-berke)
Revision history for this message
Jan Schürmann (visionfactory.net) wrote :

the time for opening a drawer is always nearly the same, even if i closed it and than open it again.
my system drawer with 40 apps, needs more than 20 seconds to open.

i will install Drawers on my Notebook and investigate the opening time there, then i come back with more information ;-)

Revision history for this message
icb410 (ian-berke) wrote :

Found the stupid problem.... Going to clean up code and then post a patch for you. Once I have enough together I will release a new version.

Changed in drawers:
status: Triaged → In Progress
Revision history for this message
icb410 (ian-berke) wrote :

Try this out:

cd /opt/extras.ubuntu.com/drawers/drawers
sudo patch < PATH_TO_PATCH/speed.patch

In one of the routines I had for placing items in the draw, I kept appending to the icon theme search path. As the drawer grew larger and larger, each item took longer and longer to add. Where before 280 items took 100s to load, now it takes 2s.

Hope that solves most of your problems.

Ian

Revision history for this message
icb410 (ian-berke) wrote :

This is the correct version.. last one had an indentation error.

Revision history for this message
Jan Schürmann (visionfactory.net) wrote :

i've tried the commands you mentioned in #4 but after starting the patch it's still "working" without any feedback since nearly 6 minutes.
is that correct?

Revision history for this message
Jan Schürmann (visionfactory.net) wrote :

inserting and deleting the entries in drawer.py seem to broke the Drawers because after doing the changes, it doesn't open anymore, even after a re-login it doesn't open.
reverting to the original drawer.py instantly makes the Drawer open again...

so the patch doesn't seem to work on my system :-(

Revision history for this message
icb410 (ian-berke) wrote : Re: [Bug 1089990] Re: opening a drawer is very slow

Sorry it's not working properly. I'm going to try and upload a testing
version by this weekend.

Best,
Ian

---sent on the go....
On Dec 13, 2012 6:20 PM, "Jan Schürmann" <email address hidden> wrote:

> inserting and deleting the entries in drawer.py seem to broke the Drawers
> because after doing the changes, it doesn't open anymore, even after a
> re-login it doesn't open.
> reverting to the original drawer.py instantly makes the Drawer open
> again...
>
> so the patch doesn't seem to work on my system :-(
>
> --
> You received this bug notification because you are a bug assignee.
> https://bugs.launchpad.net/bugs/1089990
>
> Title:
> opening a drawer is very slow
>
> Status in Drawers: Organize the Unity Launcher:
> In Progress
>
> Bug description:
> ubuntu 12.10 64-bit with the latest updates and Drawers installed
> running on a Quad-Core with 8GB RAM
>
> when left clicking on a drawer it needs up to 20 seconds to open the
> window depending on the number of applications in the drawer.
> if the drawer has "only" 15 applications in it, it still needs 5 seconds
> to open up
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/drawers/+bug/1089990/+subscriptions
>

Revision history for this message
Jan Schürmann (visionfactory.net) wrote :

that would be great, should i stop adding new drawers to my launcher until a fix is ready or should an update correct the existing drawers?

meanwhile i help translating into german ;-)

Revision history for this message
Jan Schürmann (visionfactory.net) wrote :

i mean WILL an update correct the existing drawers ;-)

Revision history for this message
icb410 (ian-berke) wrote :

Sorry, an update will only fix newly added items. Thanks for helping with
the german translation.
Best,
Ian

---sent on the go....
On Dec 13, 2012 7:10 PM, "Jan Schürmann" <email address hidden> wrote:

> i mean WILL an update correct the existing drawers ;-)
>
> --
> You received this bug notification because you are a bug assignee.
> https://bugs.launchpad.net/bugs/1089990
>
> Title:
> opening a drawer is very slow
>
> Status in Drawers: Organize the Unity Launcher:
> In Progress
>
> Bug description:
> ubuntu 12.10 64-bit with the latest updates and Drawers installed
> running on a Quad-Core with 8GB RAM
>
> when left clicking on a drawer it needs up to 20 seconds to open the
> window depending on the number of applications in the drawer.
> if the drawer has "only" 15 applications in it, it still needs 5 seconds
> to open up
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/drawers/+bug/1089990/+subscriptions
>

icb410 (ian-berke)
Changed in drawers:
status: In Progress → Fix Committed
Revision history for this message
Jan Schürmann (visionfactory.net) wrote :

when will the update be available through the PPA?

Revision history for this message
icb410 (ian-berke) wrote :

Sorry, I had a few life events occur the last couple of weeks and wasn't
able to release things. There's an update in my testing ppa. I want to test
it out a bit today and will hopefully release tonight.

---sent on the go....
On Dec 27, 2012 8:55 AM, "Jan Schürmann" <email address hidden> wrote:

> when will the update be available through the PPA?
>
> --
> You received this bug notification because you are a bug assignee.
> https://bugs.launchpad.net/bugs/1089990
>
> Title:
> opening a drawer is very slow
>
> Status in Drawers: Organize the Unity Launcher:
> Fix Committed
>
> Bug description:
> ubuntu 12.10 64-bit with the latest updates and Drawers installed
> running on a Quad-Core with 8GB RAM
>
> when left clicking on a drawer it needs up to 20 seconds to open the
> window depending on the number of applications in the drawer.
> if the drawer has "only" 15 applications in it, it still needs 5 seconds
> to open up
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/drawers/+bug/1089990/+subscriptions
>

icb410 (ian-berke)
Changed in drawers:
milestone: none → 12.12.2
icb410 (ian-berke)
Changed in drawers:
status: Fix Committed → Fix Released
Revision history for this message
Davide Depau (depau) wrote :

This affects me too. This is the output with debug mode enabled:

Debugging messages on
Read config
intializing config
Local settings False
File: /home/davideddu/.local/share/applications/Internet.desktop
Addfiles:
Detected 1 monitors
compizconfig - Info: Backend : gsettings
compizconfig - Info: Integration : true
compizconfig - Info: Profile : unity
Number of columns: 4
number of items: 12
/opt/extras.ubuntu.com/drawers/drawers/Drawer.py:273: PyGIDeprecationWarning: timeout_add is deprecated; use GLib.timeout_add instead
  GObject.timeout_add(100, self.reorder)
Quitting...

Please note that GObject.timeout_add is deprecated, and it should be replaced by GLib.timeout_add

Revision history for this message
icb410 (ian-berke) wrote :

Thank you for adding to the bug report. I will fix the GObject thing and add some output regarding the time for each step in the drawer setup. I will upload a patched file that you can then use to test on your machine. Couple of questions though:

1 -Does it matter whether you use an active drawer or a regular one (which you used above)?
2 -Does it take a long time to show also with an empty basic drawer?

Thanks,
Ian

Changed in drawers:
status: Fix Released → In Progress
Revision history for this message
icb410 (ian-berke) wrote :

Also, what version of python and these packages are you using?

 gir1.2-gtk-3.0
 python-compizconfig
 gir1.2-glib-2.0
 gir1.2-unity-5.0
 python-cairo
 gir1.2-gdkpixbuf-2.0

 I don't get the error message about GObject that you do and I wonder if there's fundamentally something different with your installation.

Revision history for this message
Javier Antonio Nisa Avila (javiernisa) wrote :

Hi, this error keeps happening, is very slow to open a drawer with three or four elements, four or five seconds ... and if you have six or seven elements will be 10 seconds.

When you go to solve this problem.

Ubuntu 14.04

Thank you,

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.