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

org/eolang/lints/Program.defect Performance: Slow Execution #133

Open
volodya-lombrozo opened this issue Dec 11, 2024 · 11 comments
Open

org/eolang/lints/Program.defect Performance: Slow Execution #133

volodya-lombrozo opened this issue Dec 11, 2024 · 11 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@volodya-lombrozo
Copy link
Member

volodya-lombrozo commented Dec 11, 2024

I have added the usage of Program.defect to the jeo-maven-plugin, and the plugin now runs three times slower than usual. I conducted performance profiling and found that the org/eolang/lints/Program.defect method accounts for 87% of the total execution time.

Please address the performance issues related to org/eolang/lints/Program.defect.

flamegraph-disassemble-28078.html.txt

@volodya-lombrozo
Copy link
Member Author

@yegor256 Take a look, please. It's a blocker as well.

@yegor256
Copy link
Member

@h1alexbel maybe you can help us investigate this?

@volodya-lombrozo
Copy link
Member Author

@yegor256 Please note, this is an urgent issue. It actually blocks any new features in jeo-maven-plugin. We need to resolve it as soon as possible.

@yegor256
Copy link
Member

@volodya-lombrozo I'm afraid, we can't solve it entirely. Some extra performance burden is expected and inevitable. Earlier, we had all linters inside eo-maven-plugin. Now they are here. Obviously, they take time. In your particular case (you may have very large XML files), the performance cost may be very high. The best you can do immediately is simply stop checking all XMIR files via linters, but only check some small files. You need linting simply to validate the correctness of your output -- no need to check all big files, just check the smallest one.

@volodya-lombrozo
Copy link
Member Author

@yegor256 It's just faster to fix the performance issue here. Otherwise, I will need to 'invent' a lot of workarounds to hide the original problem, which I will need to remove as soon as a proper solution is implemented.

@yegor256
Copy link
Member

@volodya-lombrozo I'm not sure there is any "issue" here: there are just 30+ lints which take time when XML files are huge. It's not an issue, it's cost of doing linting :)

@h1alexbel
Copy link
Contributor

@yegor256 @volodya-lombrozo how about we add new benchmark test to check Program.defect performance?

@yegor256
Copy link
Member

@h1alexbel not a bad idea to create a benchmark: it should calculate how much it takes to lint a small XMIR, a large, an X-large, an XXL, etc. We can publish this information in README, similar to how we publish it here: https://github.com/objectionary/hone-maven-plugin/blob/master/.github/workflows/benchmark.yml

@yegor256 yegor256 added bug Something isn't working help wanted Extra attention is needed labels Dec 11, 2024
@h1alexbel
Copy link
Contributor

@yegor256 assign me, I will try to

@yegor256
Copy link
Member

@h1alexbel take it, in #134

volodya-lombrozo added a commit to volodya-lombrozo/lints that referenced this issue Dec 13, 2024
volodya-lombrozo added a commit to volodya-lombrozo/lints that referenced this issue Dec 13, 2024
volodya-lombrozo added a commit to volodya-lombrozo/lints that referenced this issue Dec 13, 2024
volodya-lombrozo added a commit to volodya-lombrozo/lints that referenced this issue Dec 13, 2024
volodya-lombrozo added a commit to volodya-lombrozo/lints that referenced this issue Dec 13, 2024
volodya-lombrozo added a commit to volodya-lombrozo/lints that referenced this issue Dec 13, 2024
volodya-lombrozo added a commit to volodya-lombrozo/lints that referenced this issue Dec 13, 2024
volodya-lombrozo added a commit to volodya-lombrozo/lints that referenced this issue Dec 16, 2024
@volodya-lombrozo
Copy link
Member Author

I've provided one more profiling round for the version 0.0.27. Here are results:
flamegraph-disassemble-56062.html.txt

As we can see, the objectionary/lints still takes unreasonable amount of time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants