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: Speed up Solara space render #1819

Merged
merged 2 commits into from
Sep 26, 2023
Merged

Conversation

rht
Copy link
Contributor

@rht rht commented Sep 24, 2023

This speeds up space render for Schelling with 80x80 grid size from 1.2 s to 80 ms.

@codecov
Copy link

codecov bot commented Sep 24, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (734496c) 81.34% compared to head (3bea3a5) 81.34%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1819   +/-   ##
=======================================
  Coverage   81.34%   81.34%           
=======================================
  Files          15       15           
  Lines         879      879           
  Branches      185      185           
=======================================
  Hits          715      715           
  Misses        141      141           
  Partials       23       23           
Files Changed Coverage Δ
mesa/experimental/jupyter_viz.py 34.66% <0.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Corvince
Copy link
Contributor

Thanking for investigating the bottleneck and providing this fix.

While I don't observe such a drastic speedup on my machine, this seems to be a better default for mesas use case.

I am just wondering if it would be possible to make the format user-providable, so if someone cares more about quality (to right click and save for example) they can choose. Or maybe even generalize so any kwargs are forwarded to FigureMatplotlib.

@rht
Copy link
Contributor Author

rht commented Sep 25, 2023

I am just wondering if it would be possible to make the format user-providable, so if someone cares more about quality (to right click and save for example) they can choose. Or maybe even generalize so any kwargs are forwarded to FigureMatplotlib.

Sounds good. See also #1797. Regardless, this feature should be in a separate PR.

@Corvince Corvince merged commit a75a353 into projectmesa:main Sep 26, 2023
12 of 13 checks passed
@rht rht deleted the solara-png branch September 26, 2023 12:57
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

Successfully merging this pull request may close these issues.

2 participants