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 reload unit data if nothing changed on disk when reading Campaigns #2286

Conversation

sixlettervariables
Copy link
Contributor

I noticed this while debugging this weekend, but basically we were reloading mech data even if nothing changed on disk during CPNX load. Now, this nearly always hits the hot cache and does not make a big impact for most users. However, when I moved MHQ over to a spinning disk on my machine, this shaved about 10 seconds off CPNX load times. Folks should not expect that amount of speedup in general, as most users do not have a few hundred customs (from all of the CPNXs shared on bug reports).

@codecov
Copy link

codecov bot commented Dec 14, 2020

Codecov Report

Merging #2286 (e0dc4c1) into master (03ffd7d) will decrease coverage by 0.00%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##             master   #2286      +/-   ##
===========================================
- Coverage      8.28%   8.28%   -0.01%     
  Complexity     2587    2587              
===========================================
  Files           673     673              
  Lines         95085   95087       +2     
  Branches      15983   15984       +1     
===========================================
  Hits           7876    7876              
- Misses        86142   86144       +2     
  Partials       1067    1067              
Impacted Files Coverage Δ Complexity Δ
MekHQ/src/mekhq/campaign/io/CampaignXmlParser.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 03ffd7d...e0dc4c1. Read the comment docs.

@sixlettervariables sixlettervariables merged commit d77a5f8 into MegaMek:master Dec 14, 2020
@sixlettervariables sixlettervariables deleted the improve-cpnx-load-without-customs branch December 14, 2020 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants