Skip to content

Conversation

@kamilon
Copy link
Contributor

@kamilon kamilon commented Jan 8, 2022

This saves 50-70% of allocations on the Character API by both caching Regex and using goquery to walk the DOM (more work to be done still)
Also saves various allocation rates in all other APIs by caching the Regex

  • Add unit tests for Character API
  • Cache all Regex queries
  • Move much of Character API to goquery DOM walking vs Regex

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 9, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@tobiasehlert tobiasehlert added the go Pull requests that update Go code label Jan 9, 2022
@tobiasehlert tobiasehlert merged commit eb8863e into tibiadata:main Jan 9, 2022
@tobiasehlert tobiasehlert changed the title Add unit tests for Character API, cache all Regex queries, move much of Character API to goquery DOM walking vs Regex Rewrite of characters and adding of unit testing Jan 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

go Pull requests that update Go code

Development

Successfully merging this pull request may close these issues.

2 participants