Skip to content

[improvement]: Jack compiler is lagging with big files #447

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

Open
1 of 2 tasks
happytomatoe opened this issue Sep 8, 2024 · 3 comments · May be fixed by #483
Open
1 of 2 tasks

[improvement]: Jack compiler is lagging with big files #447

happytomatoe opened this issue Sep 8, 2024 · 3 comments · May be fixed by #483
Labels
enhancement New feature or request

Comments

@happytomatoe
Copy link
Contributor

happytomatoe commented Sep 8, 2024

Tool

Jack Compiler

Interface

Website (https://nand2tetris.github.io/web-ide)

Contact Details

No response

What feature are you proposing?

Hi!
I am writing a game in Jack and currently I have 7 files with 7238 lines.

~nand2tetris/jack/dino/src$ wc -l *
   574 Cactus.jack
   142 Cloud.jack
   707 Dino.jack
    25 Main.jack
    10 MathCustom.jack
    14 ScreenCustom.jack
  5766 Trail.jack
  7238 total

After every key stroke I need to wait about a considerable amount of time before I can continue.
Screenshot from 2024-09-08 09-29-34

Chrome shows this after I press run
Screenshot from 2024-09-08 09-39-12

How to recreate this?
I guess if you will create a lot of Jack code that will do or you can use the code from my repo.

Why my files are so big?
I've created an utility that converts images into jack code and some of the sprites are quite long (like trail width>2000 pixels) and I am drawing each pixel individually.

qq - Is this request has low priority? Additional question - do you happen to know if Java tool is still maintained?

Additional Comments

No response

Do you want to try to add this feature?

  • I want to try to add this feature!

Code of Conduct

  • I agree to follow this project's Code of Conduct
@happytomatoe
Copy link
Contributor Author

happytomatoe commented Sep 8, 2024

Please also note that VMEmulator from Java tool fails because program counter gets into negative values. I get it that this is simulator. I guess on real hardware you cannot have more than 2^15 lines of assembly code

@happytomatoe
Copy link
Contributor Author

I guess the error messages for the jack compiler in the old version are better. Please feel free to close this issue.

@DavidSouther
Copy link
Collaborator

@happytomatoe thank you for your issue report.

We will certainly leave it open to track possible performance improvements for large Jack projects, and thank you for the link to your repo so that we have some to test against!

PS The java tool is generally unmaintained and released "as is" in its current state - while the code exists in several places online, bringing it to "modern" standards was considered to be less important than this web-based interface.

@DavidSouther DavidSouther added the enhancement New feature or request label Sep 16, 2024
@happytomatoe happytomatoe linked a pull request Oct 3, 2024 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants