pfalstad / circuitjs1

Electronic Circuit Simulator in the Browser
GNU General Public License v2.0
1.65k stars 280 forks source link

Refactoring and cleanup of the entry point for readability. #23

Closed Mervill closed 1 year ago

Mervill commented 1 year ago

My very start-stop-start comb-through of the project looking for easy refactoring wins... slowly continues.

The major change in this PR is that the flow of the entrypoint code has slightly changed. loadSimulator() is now only called from loadLocale() to improve traceability. processLocale() is now a leaf function instead of a critical path function, and returns its processed data atomically so that the entrypoint class doesn't have to hold onto a refence to the locale map.

I also removed the very stale version history. I don't mean any disrespect of course. To my mind, version history should go in a dedicated file for easier access, or we should lean on the git history as a source of changes. Given that the history is quite stale I though it would be better to just exclude it. Let me know if you disagree and I'll happily revert.

cheers.

pfalstad commented 1 year ago

looks good, thanks