caching of menus in qt

View: New views
4 Messages — Rating Filter:   Alert me  

caching of menus in qt

by Massimiliano Gubinelli :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,
  I've just commited a patch to reenable caching of menus on the Qt  
port. It works fine on my mac. Now all the top level menus (main menu  
and toolbars) created by TeXmacs are cached. This should reduce the  
load on Qt (before menus where recreated each time , eg. when changing  
from math to text mode).

It would be nice to have some measurements to check if the Qt port is  
leaking memory or not. (marshalling between Qt's memory management  
policy and TeXmacs' is a delicate matter.


Best,
Massimiliano





_______________________________________________
Texmacs-dev mailing list
Texmacs-dev@...
http://lists.gnu.org/mailman/listinfo/texmacs-dev

Re: caching of menus in qt

by Joris van der Hoeven :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Oct 15, 2009 at 11:56:05AM +0200, Gubinelli Massimiliano wrote:
> I've just commited a patch to reenable caching of menus on the Qt  
> port. It works fine on my mac. Now all the top level menus (main menu  
> and toolbars) created by TeXmacs are cached. This should reduce the  
> load on Qt (before menus where recreated each time , eg. when changing  
> from math to text mode).

Cool, no apparent bugs under Snow Leopard. I did notice that
the menus still disappear when a dialogue windows pops up.
I think that this bug was present before though.

> It would be nice to have some measurements to check if the Qt port is  
> leaking memory or not. (marshalling between Qt's memory management  
> policy and TeXmacs' is a delicate matter.

We will need a valgrind expert for that.

Talking performance, we do have to solve the display interrupt issue though.
Can we recursively handle events during the repaint phase.
In that case, I can probably do something. Otherwise, I will need ideas.

I still have some problems with the keyboard from time to time.
At a certain point C-x prompts me for a Scheme command,
when I wanted to do C-x C-c. After a fresh restart, C-x C-c worked fine...

Best wishes, --Joris


_______________________________________________
Texmacs-dev mailing list
Texmacs-dev@...
http://lists.gnu.org/mailman/listinfo/texmacs-dev

Re: caching of menus in qt

by Massimiliano Gubinelli :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Unfortunately, I've just discovered that the patch does not work in  
Linux. (submenus are not shown).
I will temporarily remove it from svn.


On 15 oct. 09, at 12:46, Joris van der Hoeven wrote:

> On Thu, Oct 15, 2009 at 11:56:05AM +0200, Gubinelli Massimiliano  
> wrote:
>> I've just commited a patch to reenable caching of menus on the Qt
>> port. It works fine on my mac. Now all the top level menus (main menu
>> and toolbars) created by TeXmacs are cached. This should reduce the
>> load on Qt (before menus where recreated each time , eg. when  
>> changing
>> from math to text mode).
>
> Cool, no apparent bugs under Snow Leopard. I did notice that
> the menus still disappear when a dialogue windows pops up.
> I think that this bug was present before though.
>
>> It would be nice to have some measurements to check if the Qt port is
>> leaking memory or not. (marshalling between Qt's memory management
>> policy and TeXmacs' is a delicate matter.
>
> We will need a valgrind expert for that.
>
> Talking performance, we do have to solve the display interrupt issue  
> though.
> Can we recursively handle events during the repaint phase.
> In that case, I can probably do something. Otherwise, I will need  
> ideas.
>

I'm still investigating possible solutions. I've not clear ideas. A  
clear way to do it is to interrupt redrawing at regular times and  
return to main loop.

max


> I still have some problems with the keyboard from time to time.
> At a certain point C-x prompts me for a Scheme command,
> when I wanted to do C-x C-c. After a fresh restart, C-x C-c worked  
> fine...
>
> Best wishes, --Joris
>
>
> _______________________________________________
> Texmacs-dev mailing list
> Texmacs-dev@...
> http://lists.gnu.org/mailman/listinfo/texmacs-dev



_______________________________________________
Texmacs-dev mailing list
Texmacs-dev@...
http://lists.gnu.org/mailman/listinfo/texmacs-dev

Re: caching of menus in qt

by Joris van der Hoeven :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Oct 15, 2009 at 01:08:08PM +0200, Gubinelli Massimiliano wrote:
> I'm still investigating possible solutions. I've not clear ideas. A  
> clear way to do it is to interrupt redrawing at regular times and  
> return to main loop.

OK, that seems like a good idea; I will investigate this.
Not as good as the current system, of course, but by modifying
the time credit until interruption as a function of the current
keyboard input rate, maybe something reasonable can be worked out.

Best wishes, --Joris


_______________________________________________
Texmacs-dev mailing list
Texmacs-dev@...
http://lists.gnu.org/mailman/listinfo/texmacs-dev