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

Returning cache to life. #3307

Merged
merged 1 commit into from
May 8, 2020
Merged

Returning cache to life. #3307

merged 1 commit into from
May 8, 2020

Conversation

MaksimOrlov
Copy link
Member

This PR returns support for cache. Variable parameterId has been removed from .equals() and .hashCode() methods of ModelContext. Speed on load testing shows increasing from 130 test controllers to 300 controllers per second.

@MaksimOrlov MaksimOrlov added this to the 3.0 milestone May 8, 2020
@MaksimOrlov MaksimOrlov added the PR label May 8, 2020
@codecov
Copy link

codecov bot commented May 8, 2020

Codecov Report

Merging #3307 into master will increase coverage by 0.04%.
The diff coverage is 94.56%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #3307      +/-   ##
============================================
+ Coverage     92.95%   93.00%   +0.04%     
+ Complexity     3542     3539       -3     
============================================
  Files           382      382              
  Lines          9389     9388       -1     
  Branches        760      755       -5     
============================================
+ Hits           8728     8731       +3     
  Misses          468      468              
+ Partials        193      189       -4     
Impacted Files Coverage Δ Complexity Δ
.../documentation/schema/TypeNameIndexingAdapter.java 58.33% <33.33%> (ø) 9.00 <3.00> (ø)
...ocumentation/spi/schema/contexts/ModelContext.java 87.77% <80.00%> (+0.54%) 33.00 <1.00> (+1.00)
.../java/springfox/documentation/schema/ModelRef.java 97.67% <100.00%> (ø) 28.00 <0.00> (ø)
...x/documentation/schema/ModelReferenceProvider.java 97.43% <100.00%> (ø) 15.00 <0.00> (ø)
...ervice/contexts/OperationModelContextsBuilder.java 100.00% <100.00%> (+5.66%) 11.00 <8.00> (-5.00) ⬆️
...ntation/spring/web/scanners/ApiListingScanner.java 98.94% <100.00%> (ø) 16.00 <0.00> (ø)
...umentation/spring/web/scanners/ApiModelReader.java 95.81% <100.00%> (+0.28%) 102.00 <17.00> (ø)
...umentation/spring/web/scanners/MergingContext.java 100.00% <100.00%> (ø) 21.00 <1.00> (+1.00)

Copy link
Member

@dilipkrish dilipkrish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Just had one questions about a change.

@@ -127,7 +126,7 @@ public ApiListingScanner(

List<SecurityReference> securityReferences = new ArrayList<>();

Map<String, Set<Model>> globalModelMap = new TreeMap<>();
Map<String, Set<Model>> globalModelMap = new HashMap<>();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was tree map because it preserves the order of the models. Does this need to change to hash map?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Iterating over HashMap is faster than iterating TreeMap, and order is not important any more

@dilipkrish dilipkrish merged commit c651680 into master May 8, 2020
@dilipkrish dilipkrish deleted the bugfix/model-enhancement branch May 8, 2020 20:37
@dilipkrish
Copy link
Member

Thank you @MaksimOrlov!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants