Skip to content
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

XEmacs freezes for 11 seconds when pressing carriage return #1076

Closed
veripoolbot opened this issue Jul 14, 2016 · 3 comments
Closed

XEmacs freezes for 11 seconds when pressing carriage return #1076

veripoolbot opened this issue Jul 14, 2016 · 3 comments

Comments

@veripoolbot
Copy link
Collaborator


Author Name: Dan Hopper
Original Redmine Issue: 1076 from https://www.veripool.org


Hi,

I'm not an emacs programming expert but I have been using verilog-mode for a very long time with success. I've used it before with very long (10000-20000 line) Verilog source files without too much issue. But I recently inherited a 17,000 line source file that is giving Verilog-mode a hiccup while pressing carriage return, and I wonder if it might be possible to figure out why. The issue is that XEmacs goes out to lunch for awhile with 100% CPU when I press carriage return at the end of various lines throughout the file. The file contains Verilog-2001 and SystemVerilog features.

For example, I'm about 5000 lines into the file pressing carriage return at the end of a multi-line C++ style comment, and XEmacs locks up for ~ 12 seconds with 100% CPU. When it returns, it works normally. But this happens over and over so it's rather an impediment. As Wilson suggested in an email, I set M-x toggle-debug-on-quit, then hit ctrl-g a few seconds into the slowness, and have attached the backtrace to this issue. Maybe it's helpful to those with more expertise?

I'd appreciate any suggestions on features to disable, etc.

I've already updated to verilog-mode-2016-04-23-5f6855e-vpo.el.gz, which was the latest a few weeks ago.

Here's what I'm over-riding in ~/.emacs. (Some of the values I set 15-20 years ago so if they're not ideal then I can easily change them.) As you can see, when I first encountered this slow carriage return problem, setting "verilog-auto-indent-on-newline nil" seemed to solve it, but now I'm finding it didn't completely eliminate the behavior.

(add-hook 'verilog-mode-hook '(lambda () (font-lock-mode 1)))
(setq verilog-indent-level 4
verilog-indent-level-module 0
verilog-indent-level-declaration 0
verilog-indent-level-behavioral 4
verilog-indent-level-directive 4
verilog-cexp-indent 4
verilog-case-indent 2
verilog-auto-newline nil
;TESTING verilog-auto-indent-on-newline t
verilog-auto-indent-on-newline nil ; TESTING. Had to not set this to avoid rt.v carriage return performance issue.
verilog-tab-always-indent nil
verilog-tab-to-comment t
verilog-indent-begin-after-if nil
verilog-align-ifelse nil
verilog-auto-endcomments nil
verilog-minimum-comment-distance 40
verilog-auto-lineup '(all)
verilog-highlight-p1800-keywords nil
;verilog-linter nil
)

Thanks,
Dan Hopper

@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Dan Hopper
Original Date: 2016-07-14T16:03:16Z


Sorry, didn't notice that the pre wrapper was needed for the ~/.emacs file excerpt:

(add-hook 'verilog-mode-hook '(lambda () (font-lock-mode 1)))
(setq verilog-indent-level             4
       verilog-indent-level-module      0
       verilog-indent-level-declaration 0
       verilog-indent-level-behavioral  4
       verilog-indent-level-directive   4
       verilog-cexp-indent              4
       verilog-case-indent              2
       verilog-auto-newline             nil
       ;TESTING verilog-auto-indent-on-newline   t
       verilog-auto-indent-on-newline   nil    ; TESTING. Had to not set this to avoid rt.v carriage return performance issue.
       verilog-tab-always-indent        nil
       verilog-tab-to-comment           t
       verilog-indent-begin-after-if    nil
       verilog-align-ifelse             nil
       verilog-auto-endcomments         nil
       verilog-minimum-comment-distance 40
       verilog-auto-lineup              '(all)
       verilog-highlight-p1800-keywords nil
       ;verilog-linter                   nil
       )


@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2017-11-19T13:35:02Z


There were some performance problems, but might still a problem, perhaps someone would like to check and contribute a patch?

@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2019-12-21T15:19:47Z


Closing due to age, if someone wants to contribute a patch we'll consider it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant