-
-
Notifications
You must be signed in to change notification settings - Fork 96
avoid freeze from big cascade menu #65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
I provide the test for this trouble. https://gist.github.com/aki2o/3311aad5cd533fc21c8a In my environment, |
|
Please wait until I understand this patch. |
popup.el
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it better following code than this ?
(cl-loop for e in list
for idx = 0 then (1+ idx)
collect (popup-make-item e :rawindex idx))There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't know that syntax, thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can also be even simpler:
(cl-loop for e in list
for idx from 0
collect (popup-make-item e :rawindex idx))|
Sorry very too late reply. freezeするというサンプルと, いろいろ試してみたのですが, フリーズしたり よろしくお願いします. |
|
返信ありがとうございます。 拙作のctxmenu.elを使って試して頂くことは可能でしょうか? (require 'ctxmenu-config)
(ctxmenu-config:setup)を評価し、M-x 私の以下の環境では、上記で発生します。 お手数ですが、どうぞ宜しくお願い致します。 |
|
Okay, I don't know Japanese. I might need some help here. Thanks! |
When do
popup-cascade-menuusing big list,I encountered the freeze and memory consumption increase of Emacs.
And the following message was shown.
Then, I've been able to avoid it by the following change.
In addition, I think the sublist slot of
popup-menu*should be deprecated.So, I've appended the comment about it.
Best regards.
英語が不得手なので、日本語で一応補足します。
popup-cascade-menuを使わせて頂いているのですが、巨大なカスケードメニューを作ってみた所、子メニューを辿ったり、スクロールしたり、C-gで終了しようとした時に、Emacsがフリーズし、使用メモリ量が急上昇します。
現在は、カスケードされる子メニューのリストを親メニュー要素のテキストプロパティで保持していますが、
それを
popup-menu-event-loopに引数で渡すようにすることで解決できました。ただ、isearchで絞り込んだ場合、親メニュー要素の本来の順番が不明になり、
対応する子メニューが判別できなくなってしまうため、各メニュー要素に本来の順番をテキストプロパティで保持するようにしました。
あと、sublistスロットは今後使うべきでないと思うので、その旨のコメントを加えました。
現在、popup.elを使った拡張を作っているのですが、フリーズしてしまうのは何とかして避けたいです。
どうぞ宜しくお願い致します。