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

perf: use base32 space for random names instead of base16 #25497

Merged
merged 1 commit into from
Mar 17, 2024

Conversation

ankush
Copy link
Member

@ankush ankush commented Mar 17, 2024

Better implementation of #25309

This has all the same benefits as before:

operation before after difference
read a single document w/ 1000 child table rows; MySQL pages read 885 8 100x reduction

With the added benefits:

  • names are sequential for at 32^4 /10 seconds (as opposed to completely random distribution)
  • Collision is far less likely now (base32 vs base16)

@ankush ankush requested review from a team and akhilnarang and removed request for a team March 17, 2024 13:55
@ankush ankush force-pushed the base32 branch 2 times, most recently from 24fb18f to ebfcf81 Compare March 17, 2024 14:04
@ankush ankush added the defer backport Backports for some PR are deferred for a week or two to test them properly before releasing label Mar 17, 2024
@ankush ankush merged commit adf24b2 into frappe:develop Mar 17, 2024
23 checks passed
@ankush ankush deleted the base32 branch March 17, 2024 14:32
@ankush ankush added backport version-15-hotfix Backport the PR to v15 and removed defer backport Backports for some PR are deferred for a week or two to test them properly before releasing labels Mar 19, 2024
mergify bot pushed a commit that referenced this pull request Mar 19, 2024
(cherry picked from commit adf24b2)

# Conflicts:
#	frappe/model/naming.py
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport version-15-hotfix Backport the PR to v15
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant