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

Xmir.toPhi method takes unreasonable amount of time #3864

Open
volodya-lombrozo opened this issue Jan 28, 2025 · 7 comments
Open

Xmir.toPhi method takes unreasonable amount of time #3864

volodya-lombrozo opened this issue Jan 28, 2025 · 7 comments

Comments

@volodya-lombrozo
Copy link
Member

Xmir.toPhi method takes unreasonable amount of time to transform XMIR files to PHI expressions.

The most problematic line is here:

return new Xnav(new Xsline(train).pass(this.xml).inner())

Particularly new Xsline(train).pass(this.xml).

Here is profiling results:

flamegraph-phi-unphi-90391.html.txt

maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Feb 9, 2025
maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Feb 9, 2025
maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Feb 9, 2025
maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Feb 9, 2025
maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Feb 9, 2025
maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Feb 9, 2025
maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Feb 9, 2025
github-merge-queue bot pushed a commit that referenced this issue Feb 10, 2025
@maxonfjvipon
Copy link
Member

@yegor256 let's make a new release with tag 0.51.3

@yegor256
Copy link
Member

@rultor release, tag is 0.51.3

@rultor
Copy link
Contributor

rultor commented Feb 10, 2025

@rultor release, tag is 0.51.3

@yegor256 OK, I will release it now. Please check the progress here.

@rultor
Copy link
Contributor

rultor commented Feb 10, 2025

@rultor release, tag is 0.51.3

@yegor256 Done! FYI, the full log is here (took me 9min).

@maxonfjvipon
Copy link
Member

@volodya-lombrozo in the new release we removed StUnhex from Xmir.toPhi. In theory this converting should be faster now, please try a new version and let me know if it helped

@volodya-lombrozo
Copy link
Member Author

volodya-lombrozo commented Feb 13, 2025

@maxonfjvipon I've repeated profiling on a small test and it works faster, indeed. Here are results:

flamegraph-phi-unphi-39548.html.txt

As you might see we have the following statistics:

Xmir.toPhi takes ~ 8.26% of execution time
Phi.unphi takes ~ 12.67%
Assembler.assemble ~ 1.36% (jeo)
Disassembler.disassemble ~ 3.64% (jeo).

They are pretty good numbers.

However, this test works only with 6 small classes. I'll try to profile more comprehensive example.

@volodya-lombrozo
Copy link
Member Author

@maxonfjvipon I've tried to run profiling on large number of files and immediately got the error: #3916

It's kinda blocker

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

4 participants