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

Add support for Just-In-Time parsing #529

Open
MicahGale opened this issue Aug 30, 2024 · 0 comments
Open

Add support for Just-In-Time parsing #529

MicahGale opened this issue Aug 30, 2024 · 0 comments
Labels
feature request An issue that improves the user interface. parsers are hard Examples of where MCNP syntax is complicated and should be simplified. performance 🐌 Issues related to speed and memory

Comments

@MicahGale
Copy link
Collaborator

MicahGale commented Aug 30, 2024

Is your feature request related to a problem? Please describe.

This issue is related to #382, and came from a discussion with @dodu94.

Right now reading a large file can be resource intensive. Usually while editing an MCNP input file a small fraction of the inputs are actually edited.

Describe the solution you'd like

So the idea is: what if the parsing step only occurs when a specific object is accessed.

For instance

# very fast step
problem = montepy.read_jit(...)
# this is when parsing actually occurs
problem.cells[5].mass_density = 1.0

Describe alternatives you've considered
An alternative would be #382.

Additional context

This would be most useful for fusion models.

@MicahGale MicahGale added feature request An issue that improves the user interface. parsers are hard Examples of where MCNP syntax is complicated and should be simplified. performance 🐌 Issues related to speed and memory labels Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request An issue that improves the user interface. parsers are hard Examples of where MCNP syntax is complicated and should be simplified. performance 🐌 Issues related to speed and memory
Projects
None yet
Development

No branches or pull requests

1 participant