Cinnamon and the slow menu from the stoneage

Please post suggestions for improvement of Cinnamon here
https://github.com/linuxmint/Cinnamon

Does your Cinnamon-menu pop up INSTANTLY, without the slightest lag or delay?

Instantaneous - I have an nVidia graphics card
20
17%
Instantaneous - I have an AMD Radeon graphics card
7
6%
Instantaneous - I have Intel HD Graphics
7
6%
Instantaneous - I have something else
0
No votes
Lags with delay - I have an nVidia graphics card
29
24%
Lags with delay - I have an AMD Radeon graphics card
20
17%
Lags with delay - I have Intel HD Graphics
31
26%
Lags with delay - I have something else
7
6%
 
Total votes : 121

Re: Cinnamon and the slow menu from the stoneage

Postby Redsandro on Sun Dec 02, 2012 9:17 pm

@davidoide @joequant Thanks. The original authors didn't care much for using comments in their code. :/ Is it written by humans or generated by some other script or tool?

And what javascript implementation is this? const and let are not javascript spec.

esteban1uy wrote:I think you're probably affected by the "emulated shaders" problem introduced by the new Mesa.


I tested it out, but as expected by observation ((a) default style has no shadows and (b) delay seems to vary) this appears not to be the case.

Unless I made a typo, here's verifying the environment was updated properly:
Code: Select all
$ echo $COGL_DEBUG
disable-glsl
Redsandro
Level 2
Level 2
 
Posts: 99
Joined: Sun Jul 17, 2011 6:40 pm

Linux Mint is funded by ads and donations.
 

Re: Cinnamon and the slow menu from the stoneage

Postby Redsandro on Sun Dec 02, 2012 9:52 pm

@joequant I tested out your github version and for me there is no noticeable difference. If any, the first menu-open after booting took even longer, but that could be random.

Although I think it is clear, especially with the first and longer delay, that this is CPU- and maybe other resources related. There is a 5 second spike in CPU usage when there is a 5 second menu delay. The follow-up half second delays also spike somewhat but it is too short to measure with a simple resource applet.

It is true though that I have quite some extra programs installed. So I am curious if the people with instant menu also have the least amount of extra packages installed?

To see if this is relevant, would you Mint colleagues be so kind to post your non-default package count?

Post in one line in large/bold (for overview purposes) [yes|no] <non-automatic package-count> like so:

yes (I have a lag/delay in the menu) or no (the menu displays instant) and then the output of this command:
Code: Select all
aptitude search '!~M ~i' -F '%p' | wc -w


For me that is:

yes 2034
Redsandro
Level 2
Level 2
 
Posts: 99
Joined: Sun Jul 17, 2011 6:40 pm

Re: Cinnamon and the slow menu from the stoneage

Postby joequant on Sun Dec 02, 2012 10:25 pm

It's an internal gnome javascript implementation

http://stackoverflow.com/questions/8078 ... umentation

I don't know much about it myself, so any bits of documentation would be helpful. I'm looking for some sort of firebug like debugger. This looks interesting...

https://live.gnome.org/GnomeShell/LookingGlass

The fix that I put in corrects an O(N**2) search. What happens when the menu adds a new application is that it looks over the existing apps to see if there is a duplicate with a linear search so you end up with O(N**2) behavior. I replaced the search with a hash table which gives you O(N) behavior. It helped my ASUS netbook a lot.

There are probably more inefficiencies in the javascript code. One big one is that I think it's calling refreshApp too often. It really should only refresh the app buttons when there are new apps added/removed, but unfortunately, when anything changes (i.e. recent documents), it reloads all of the apps.

One other tool, I've been trying to get compiled is Bugle

http://www.opengl.org/sdk/tools/BuGLe/

This should help with debugging issues in the OpenGL code.

One good thing about this is that I very strongly suspect that the problem is with the menu applet and it's not a general problem with the cinnamon infrastructure.

I have order 1000 applications. I accidentally stumbled on a fix when I was installing a new machine, and the menu was lightning quick with 50 apps.
joequant
Level 1
Level 1
 
Posts: 2
Joined: Sat Dec 01, 2012 12:18 am

Re: Cinnamon and the slow menu from the stoneage

Postby Redsandro on Sun Dec 02, 2012 10:44 pm

I don't know if the script 'launches' everytime or if it's an 'always-on' script, but it really aught to have a menu ready at all times, and instantly show it when it is activated. Any kind of updating, adding apps, checking dupes, playing secret invisible pinball games do not concern the user and should happen anywhere, anytime but not when the user wants to see the menu.

It's indeed unfortunate that a big open source project is so badly commented. I almost have a harder time understanding the Cinnamon-menu than I have with John Carmack's Doom 3 source code. At least 30% of his code is comments about how and why.
Redsandro
Level 2
Level 2
 
Posts: 99
Joined: Sun Jul 17, 2011 6:40 pm

Re: Cinnamon and the slow menu from the stoneage

Postby esteban1uy on Sun Dec 02, 2012 11:51 pm

Redsandro wrote:I tested it out, but as expected by observation ((a) default style has no shadows and (b) delay seems to vary) this appears not to be the case.

I'm sorry it didn't work for you, but the suggestion was intented for davidoide, because he expressed in a previous post he has a asus eeepc 1018p. Those machines come with a GMA 3150 GPU, that are known to have some problems with GLSL.
On the other hand, the shadows in a theme have nothing to do with GLSL vertex or pixel shaders, they are fully implemented in Cairo using Cogl offscreen buffers, as you can see at the source code: https://github.com/linuxmint/Cinnamon/b ... -drawing.c (just follow the st_theme_node_paint fuction to see how a Cinnamon element is painted). But the scroll-view controls (like in the scroller at Cinnamon menu) use an effect implemented by means of glsl shaders: https://github.com/linuxmint/Cinnamon/b ... iew-fade.c
Sorry, I only speak Spanish
User avatar
esteban1uy
Level 5
Level 5
 
Posts: 734
Joined: Sat Nov 12, 2011 6:20 am

Re: Cinnamon and the slow menu from the stoneage

Postby Redsandro on Sun Dec 02, 2012 11:58 pm

My mistake. :mrgreen:

I speed-read everything as possible general solutions and give feedback when they are ineffective.
Didn't catch the specificness but I hope it works for davidoide.
Redsandro
Level 2
Level 2
 
Posts: 99
Joined: Sun Jul 17, 2011 6:40 pm

Re: Cinnamon and the slow menu from the stoneage

Postby davidoide on Mon Dec 03, 2012 6:17 am

Redsandro wrote:My mistake. :mrgreen:

I speed-read everything as possible general solutions and give feedback when they are ineffective.
Didn't catch the specificness but I hope it works for davidoide.


Hi, I'ive been reading all your answers, it's very nice of you.
Unfortunately I can't follow your technical hypotheses or provide any suggestions, I'm not familiar with any programming language (except matlab, but I don't think it counts....)

For what concerns my cinnamon-menu situation I'm stack with a 2-3 sec delay on boot and 0.5-1 sec lag from the second time on.
If I don't open the menu for several minutes the lag becomes more noticeable, but not as much as on cold boot.
I have also noticed that the scrolling of all applications in the menu is jerkely.

I'm pretty satisfied with the overall behaviour of the cinnamon-mint synergy, although as a newbie user I find annoying to see some things working very fast and others (maybe more frequently used) too slow also for a basic configuration like mine.

For Redsandro
yes 1713
davidoide
Level 1
Level 1
 
Posts: 6
Joined: Sun Nov 25, 2012 3:57 am

Re: Cinnamon and the slow menu from the stoneage

Postby esteban1uy on Mon Dec 03, 2012 6:24 am

davidoide wrote:I have also noticed that the scrolling of all applications in the menu is jerkely.


Did you already try this?: viewtopic.php?f=208&t=116702&start=20#p655002

No changes?
Sorry, I only speak Spanish
User avatar
esteban1uy
Level 5
Level 5
 
Posts: 734
Joined: Sat Nov 12, 2011 6:20 am

Re: Cinnamon and the slow menu from the stoneage

Postby davidoide on Mon Dec 03, 2012 6:33 am

esteban1uy wrote:
davidoide wrote:I have also noticed that the scrolling of all applications in the menu is jerkely.


Did you already try this?: viewtopic.php?f=208&t=116702&start=20#p655002

No changes?


Yes, I did. I think that it has helped a little. At the moment I have used joequant fix and yours. The delay on cold boot I'm quite sure was higher without any fix (4-5 sec, now 2-3) while the lag in the subsequent opening is maybe reduced a little, and it's acceptable now. Instead the scrolling problem is very annoying...it's better to use the search directly
davidoide
Level 1
Level 1
 
Posts: 6
Joined: Sun Nov 25, 2012 3:57 am

Re: Cinnamon and the slow menu from the stoneage

Postby gibbs1984 on Wed Dec 05, 2012 4:29 pm

Yes - 1714.

I've tried the code changes on the previous page and it seems a bit faster now, not much though. Although that could just be a placebo effect...

Will monitor this thread though on the hope there is a permanent fix :)
Linux Mint 15 Nadia (Cinnamon) 32bit.
User avatar
gibbs1984
Level 5
Level 5
 
Posts: 610
Joined: Mon Oct 27, 2008 2:40 pm
Location: Hemel Hempstead, England

Re: Cinnamon and the slow menu from the stoneage

Postby Redsandro on Wed Dec 05, 2012 6:18 pm

I just spent 2 hours with /usr/share/cinnamon/applets/menu@cinnamon.org/applet.js but couldn't get it to act nicely.
It doesn't help that there is
  • Hardly explanatory comments
  • Hardly any clear or complete documentation as far as I can google
  • Custom javascript implementation

I tried and failed. So my hope is being very specific about the problem and letting the devs know.

If you have a github account, please confirm problems and test patches at:
https://github.com/linuxmint/Cinnamon/issues/1389
An issue with a lot of talk is an issue with a lot of gravity.
Last edited by Redsandro on Thu Dec 27, 2012 5:50 pm, edited 1 time in total.
Redsandro
Level 2
Level 2
 
Posts: 99
Joined: Sun Jul 17, 2011 6:40 pm

Re: Cinnamon and the slow menu from the stoneage

Postby aceleron on Wed Dec 26, 2012 9:54 am

Pointedstick wrote:Is it possible that you guys who are experiencing lag are using Cinnamon themes that explicitly introduce a delay or fade the menu in slowly or something? I noticed while I was trying different themes that some were much faster than others to open the menu.


I can confirm this. In my case themes like Cinnamon or OMG has a fade effect when menu show up or when disapear. Then, I tried other themes like Gnome or Loki and menu apperars more, more faster than before.

Now I using Lki theme and menu appears quickly.

Thanks for advice. :!:
"Practice and search the truth always, question all and believe in nothing." -aceleron/S.E. Lain
"The greatness of a nation can be judged by the way with that your animals are treated" -Mahatma Gandhi
User avatar
aceleron
Level 1
Level 1
 
Posts: 6
Joined: Sat Nov 03, 2012 8:29 pm
Location: Alpha Centauri - Brazil

Re: Cinnamon and the slow menu from the stoneage

Postby Redsandro on Thu Dec 27, 2012 5:54 pm

Faster themes or not, the slowness is in fact known problem that cannot seem to get fixed upstream (Shell) or downstream (Cinnamon).
You either need a supercomputer or a large tolerance for lag not to notice this.

https://github.com/linuxmint/Cinnamon/issues/1389
Redsandro
Level 2
Level 2
 
Posts: 99
Joined: Sun Jul 17, 2011 6:40 pm

Re: Cinnamon and the slow menu from the stoneage

Postby mockturtl on Thu Dec 27, 2012 7:01 pm

Redsandro wrote:And what javascript implementation is this? const and let are not javascript spec.
It's spidermonkey, so you can use mozilla's documentation.

The new syntax is supposed to be js.next or ECMA6 or TC39 -- I don't think the vendors have agreed on how to count, or much else, but the name is definitely "Harmony" -- and it'll be right along, one of these years.

joequant, #1389 wrote:Any suggestions for profiling/debugging tools. Will global.log just dump things to STDOUT?
You can enable logging to a file. (cinnamon-settings -> General)
Image
User avatar
mockturtl
Level 4
Level 4
 
Posts: 437
Joined: Sat Oct 09, 2010 8:51 pm

Re: Cinnamon and the slow menu from the stoneage

Postby bimsebasse on Thu Dec 27, 2012 7:03 pm

I hate lag and have a non-special 2010s laptop - yet my menu opens fast! :D

Doesn't that just make your day, redsandro?
Thank you for this thread. That’s all I can say. You most definitely have made this forum into something special. You clearly know what you are doing, you’ve covered so many bases. Thanks!
User avatar
bimsebasse
Level 7
Level 7
 
Posts: 1709
Joined: Fri Nov 11, 2011 10:21 am
Location: Scandinavia

Re: Cinnamon and the slow menu from the stoneage

Postby Redsandro on Thu Dec 27, 2012 11:21 pm

@mockturtl Thanks, didn't know that. It's not my favorite year when that spec becomes universal ecma because I don't like the extra keywords but if it serves a cause it's probably a good idea.

@bimsebasse Nope, it just pisses me off because it makes me seem like an idiot with imaginary problems. :P

Luckily the devs working on the problem acknowledge it. :)
Redsandro
Level 2
Level 2
 
Posts: 99
Joined: Sun Jul 17, 2011 6:40 pm

Re: Cinnamon and the slow menu from the stoneage

Postby bimsebasse on Fri Dec 28, 2012 5:57 am

There's a difference between not acknowledging an issue and reacting to the annoying common fallacy of "x doesn't work well for me = x doesn't work well for anyone", and it's not a fine difference.
Thank you for this thread. That’s all I can say. You most definitely have made this forum into something special. You clearly know what you are doing, you’ve covered so many bases. Thanks!
User avatar
bimsebasse
Level 7
Level 7
 
Posts: 1709
Joined: Fri Nov 11, 2011 10:21 am
Location: Scandinavia

Re: Cinnamon and the slow menu from the stoneage

Postby Redsandro on Fri Dec 28, 2012 6:23 am

Agreed. Although there is also a difference between "x doesn't work well for me = x doesn't work well for anyone" and the even more annoying "x works well for me = you probably made a configuration error on your end", and I am not sure if you mean me with your statement because I have already established that "x doesn't work for me and in this case about half of the users here", but the problem has been identified and acknowledged in the bugtracker, and although I am unsure how a structural problem like that could leave half the Cinnamon population unaffected, I appreciate the attempts that are being made to fix this.
Redsandro
Level 2
Level 2
 
Posts: 99
Joined: Sun Jul 17, 2011 6:40 pm

Re: Cinnamon and the slow menu from the stoneage

Postby bimsebasse on Fri Dec 28, 2012 6:49 am

It's a well-known problem, it often receives (attempts at) fixes in the development version of Cinnamon, no one is denying it or neglecting it, no one has any problem with it not being denied or neglected....
Thank you for this thread. That’s all I can say. You most definitely have made this forum into something special. You clearly know what you are doing, you’ve covered so many bases. Thanks!
User avatar
bimsebasse
Level 7
Level 7
 
Posts: 1709
Joined: Fri Nov 11, 2011 10:21 am
Location: Scandinavia

Re: Cinnamon and the slow menu from the stoneage

Postby Redsandro on Fri Dec 28, 2012 6:56 am

Not in Cinnamon, but there are questionable API decisions upstream that the javascript depends on, and I hear left and right that it's quite the challenge to get patches accepted into the GNOME core.
Redsandro
Level 2
Level 2
 
Posts: 99
Joined: Sun Jul 17, 2011 6:40 pm

Linux Mint is funded by ads and donations.
 
PreviousNext

Return to Cinnamon

Who is online

Users browsing this forum: No registered users and 13 guests