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

Long lists problem #60

Open
dimitrik-fr opened this issue Aug 9, 2017 · 4 comments
Open

Long lists problem #60

dimitrik-fr opened this issue Aug 9, 2017 · 4 comments

Comments

@dimitrik-fr
Copy link

dimitrik-fr commented Aug 9, 2017

Seems like when symbol lists become very long, they are no more shown correctly.. - e.g. you may see function names only, but no more other tags (or other tags, but not functions) -- is it a known issue ?

Rgds,
-Dimitri

@mbuc82
Copy link
Collaborator

mbuc82 commented Aug 9, 2017

Hello @dimitrik-fr ,

thanks a lot for this report. As far as i know, this behavior is not know. Do you have any screenshots or testfiles we can use for debugging?

Thanks in advance!

Regards
Marco

@dimitrik-fr
Copy link
Author

Hi Marco,

so far, I'll try to provide you a test case -- this is from an auto-generated LUA file containing a list of functions + some "fixme" comments.

here is how looking a file with 50 functions:

screenshot

and now the same, but with 100 functions:

screenshot

as you can see, the "fixme" tags are no more here in the second case..

how to reproduce: I think you can observe it with any big file, but in case I'm doing something wrong, I'll present here exactly the steps I'm doing ;-))

first of all, I've added into your "symbols-list/lib/symbols-list-regex.coffee" file the regex info for LUA:

    lua:
        regex:
            function: /^(?:local|[^\n\S])*function +([\w]+)/gmi
            todo: /(?:\/\*|--\s)[ ]*todo\:[ ]*(.+?)[ ]*(?:\*\/)?(?:[\r\n])/gmi
            fixme: /(?:\/\*|--\s)[ ]*fixme\:[ ]*(.+?)[ ]*(?:\*\/)?(?:[\r\n])/gmi
            hack: /(?:\/\*|--\s)[ ]*hack\:[ ]*(.+?)[ ]*(?:\*\/)?(?:[\r\n])/gmi

then, here are 2 test LUA files (one with 50 functions, and another with 100 functions) - I changed extension from .lua to .txt to let github upload the files correctly:

don't know if this will help, but if in the list of regex patterns I'll place the "fixme" line before "function", all will work as expected (as amount of "fixme" in the file lower than "function") - so looks like some internal overflow somewhere..

hope the test case will help to get it fixed ;-))

Rgds,
-Dimitri

@dimitrik-fr
Copy link
Author

Any chances to get it fixed ? -- the issue is really annoying making periodically whole list of functions (or other symbols) disappearing..

Rgds,
-Dimitri

@dimitrik-fr
Copy link
Author

So, far, as the problem still remains in the latest release as well, I decided to dig it myself in the source code and seems like I've found THE reason why such is happening..

in your function "recursiveScanRegex" you're using the "recursive_time_limit = 500.0" which seems to limit the time of overall execution for this function.. -- which is fine when you're editing small files with few functions / tags / etc.. -- but as soon as the file is big and having many elements, such a hardcode timeout is finishing by giving completely random results : on every file save you could see some names to disappear from the list, then re-appear again on the next file save, and so on..

changing 500.0 to 5000.0 "fixing" the issue (all names are present).

But I'd say, it will be much more better to propose this "time limit value" as a config option to:

  1. make people aware about
  2. let them to decide themselves on how long they wish to wait..

Rgds,
-Dimitri

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