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

Intendation is slow when inserting a new line into the thousands signal interface #229

Open
netvolcano opened this issue Mar 6, 2023 · 3 comments

Comments

@netvolcano
Copy link

I found an issue with the plugin of 3.0 version. When I have more 2 thousands of interface signals, there will be a long time waiting to finish GetContextIndent function (I used a profile log file to confirm this). I tried the current master version of the plugin also, but it can not slove the problem.

I found this issue similar to the issue [ Intendation at end of medium-large files is slow #190 ].

I suggest there will be a max limit of the scaned line number in the GetContextIndent function.

@netvolcano
Copy link
Author

verilog plugin

@vhda
Copy link
Owner

vhda commented May 10, 2023

The current implementation of the indentation script focuses on correctness of indentation, which would become broken with such limit.
This limit can be implemented, but first I'd like to better understand your scenario to make sure there are no alternatives.
What are you doing when this slowness occurs? Are you indenting the complete file, or simply starting a new line?
In case of the latter, would it be possible to show the immediate context before this new line? I understand you will not be able to share the 2k lines file, but I'd like to understand if there's something we could use to obtain an indentation value faster.
Thanks!

@netvolcano
Copy link
Author

When I opened a verilog file with more than 2 thousands of interface signals, I wanted to insert a new line to add a new signal, Vim would waiting long time to response (it seemed to scan too many lines to determine the correct context). I tried to add a limit to constrain the max scan lines to speed this. I think you can add a global variable to implement this (i.e. It is better to record the current context into a variable. When reached the max scaned line number but cannot determine the context, you can use the recorded context instead).

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

No branches or pull requests

2 participants