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

perf: Optimize contains_call() by adding memoization #105

Merged
merged 1 commit into from
May 24, 2024

Conversation

tomlau10
Copy link

@tomlau10 tomlau10 commented Jan 30, 2024

This will fix #104 by adding memoization to the function contains_call(). With this optimization, the time required for linting the provided test file using both the latest version and v0.25 of luacheck is nearly identical.

@tomlau10
Copy link
Author

tomlau10 commented Feb 19, 2024

Hi, could @alerque take a look at this when you get a chance?

src/luacheck/stages/resolve_locals.lua Outdated Show resolved Hide resolved
@alerque alerque enabled auto-merge (squash) May 24, 2024 07:24
@alerque alerque disabled auto-merge May 24, 2024 07:24
@alerque alerque merged commit b39bbd0 into lunarmodules:master May 24, 2024
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Performance degradation when linting large Lua files with luacheck v0.26+
2 participants