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

Don't keep simulation results in array (Memory optimisation) #32

Closed
damonhook opened this issue Feb 13, 2020 · 0 comments · Fixed by #35
Closed

Don't keep simulation results in array (Memory optimisation) #32

damonhook opened this issue Feb 13, 2020 · 0 comments · Fixed by #35
Labels
api The issue relates to the Nodejs API (Backend)
Projects
Milestone

Comments

@damonhook
Copy link
Owner

Currently it does all of the simulations and maps the results to an array. It then uses this array to create the frequency counts, and then no further use is needed for it.

Instead we should just build the frequency array as we simulate. This will improve memory utilisation.

@damonhook damonhook added the api The issue relates to the Nodejs API (Backend) label Feb 13, 2020
@damonhook damonhook added this to the v2.0.0 milestone Feb 13, 2020
@damonhook damonhook added this to To do in v2.0.0 via automation Feb 13, 2020
@damonhook damonhook moved this from To do to In progress in v2.0.0 Feb 13, 2020
damonhook added a commit that referenced this issue Feb 13, 2020
## API

- Use a calculated population max (The actual max) rather than basing it on the max value of the simulated sample (fixes: #30)
- Remove Median as the way the data is distributed, it is usually extremely close to mean anyway
- Calculate frequency table on the fly, rather than creating a large results array first (fixes #32)
@damonhook damonhook moved this from In progress to Done in v2.0.0 Feb 13, 2020
damonhook added a commit that referenced this issue Feb 21, 2020
…ce improvements (#35)

## Additions

- Users can now toggle profile and target modifiers using a toggle switch (fixes #38).

## UI

- Remove Beta Tag from non beta features
- Small UI overhaul for Desktop (Mostly related to the drawer)
- Add Warcry Statshammer links and buttons (fixes: #23)
- Change SVG Text Object -> Path (fixes #25)
    - Use SVGIcon instead of loading through img src
- Make the Left navigation bar responsive based on the following criteria (fixes #34)
    - **Large:** Show the full drawer
    - **Medium**: Show a Rail but let users open the drawer
    - **Small:** Hide the rail, let users open the drawer
- Add an Average damage graph to the `Metrics` tab in the `Simulations` screen for easier reference

## API

- Use a calculated population max (The actual max) rather than basing it on the max value of the simulated sample (fixes: #30)
    - This has had the effect of vastly improving the accuracy of the simulated metrics.
    - Also use the population mean, rather than the sample mean
- Remove Median as the way the data is distributed, it is usually extremely close to mean anyway
- Calculate frequency table on the fly, rather than creating a large results array first (fixes #32)
- Completely refactor the response structure of the `/api/simulate` and `/api/simulate/save` endpoints for better visibility and extensibility.
- Added Sentry to API to capture errors (Fixes: #39)

## Notes

- This UI overhaul was more focused on navigation, the next one will be more about layout
- Though it may not look it, this release had a huge amount of behind the scenes changes
- Since the 2.0.0 branch, I have been using Github projects to greater effect, this means you can watch the project for a specific version to see the currently planned items, and their progress
    - [v2.0.0](https://github.com/damonhook/aos-statshammer/projects/1) This one
    - [v2.1.0](https://github.com/damonhook/aos-statshammer/projects/2) The next one
    - [v2.2.0](https://github.com/damonhook/aos-statshammer/projects/3) This one
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api The issue relates to the Nodejs API (Backend)
Projects
No open projects
v2.0.0
  
Done
Development

Successfully merging a pull request may close this issue.

1 participant