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 (backport #25497) #26655

Merged
merged 2 commits into from
Jun 4, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Jun 3, 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)

This is an automatic backport of pull request #25497 done by [Mergify](https://mergify.com).
This is an automatic backport of pull request #25546 done by [Mergify](https://mergify.com).

…25497) (#25546)

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

(cherry picked from commit adf24b2)

# Conflicts:
#	frappe/model/naming.py

* chore: conflicts

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
(cherry picked from commit 0723853)

# Conflicts:
#	frappe/model/naming.py
@mergify mergify bot added the conflicts label Jun 3, 2024
Copy link
Contributor Author

mergify bot commented Jun 3, 2024

Cherry-pick of 0723853 has failed:

On branch mergify/bp/version-14-hotfix/pr-25546
Your branch is up to date with 'origin/version-14-hotfix'.

You are currently cherry-picking commit 072385301b.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   frappe/tests/test_naming.py

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   frappe/model/naming.py

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@mergify mergify bot requested review from a team and ankush and removed request for a team June 3, 2024 11:52
@ankush ankush changed the title perf: use base32 space for random names instead of base16 (backport #25497) (backport #25546) perf: use base32 space for random names instead of base16 (backport #25497) Jun 4, 2024
@ankush ankush merged commit 335cd28 into version-14-hotfix Jun 4, 2024
10 checks passed
@ankush ankush deleted the mergify/bp/version-14-hotfix/pr-25546 branch June 4, 2024 05:32
frappe-pr-bot pushed a commit that referenced this pull request Jun 4, 2024
## [14.76.1](v14.76.0...v14.76.1) (2024-06-04)

### Bug Fixes

* **address_query:** show search fields in description if set ([466b428](466b428))
* **address_query:** use title field if set ([00562b7](00562b7))
* Auto Email Report not working when Add Total Row is enabled ([#26667](#26667)) ([3077f26](3077f26))
* Avoid concurrent TODO updates ([#26593](#26593)) ([df821ee](df821ee))
* bypass IP restriction for the methods required for our socketio backend ([b8eca5c](b8eca5c))
* don't copy "Standard" on dashboard chart (backport [#26649](#26649)) ([#26650](#26650)) ([6fe6717](6fe6717))
* fail on cypress install failure ([bf2f9c2](bf2f9c2))
* kanban filters fixes ([#26605](#26605)) ([#26609](#26609)) ([06924c1](06924c1))
* **link-preview:** Correct synchronization of preview data on change. ([#26641](#26641)) ([#26653](#26653)) ([23e4e48](23e4e48))
* **make_request:** don't blindly try to check the content-type ([862840d](862840d))
* never show virtual fields in list view (backport [#24666](#24666)) ([#26578](#26578)) ([58db67d](58db67d))

### Performance Improvements

* memory leak on kanban refresh ([#26597](#26597)) ([#26598](#26598)) ([a45237d](a45237d))
* use base32 space for random names instead of base16 (backport [#25497](#25497)) ([#26655](#26655)) ([335cd28](335cd28)), closes [#25546](#25546)
@frappe-pr-bot
Copy link
Collaborator

🎉 This PR is included in version 14.76.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

akhilnarang added a commit that referenced this pull request Jun 19, 2024
…-25050

* version-14-hotfix: (29 commits)
  refactor(web list): use CSS class `d-none` instead of `hidden`
  fix: auto filter publish field (#26151)
  fix(desk): Don't trigger minimized dialog action on Ctrl-S
  fix(query_report): don't follow reference report for `prepared_report` field
  fix: avoid popping from empty list
  feat: set the only email address as primary
  fix: shorten_number
  fix: Email tracking without "use_ssl" (backport #26718) (#26734)
  fix(package_release): set path to tarball
  chore: Reword "Recursive Fetch From" message (#26706) (#26707)
  fix: Skip virtual fields in all select queries (backport #26700) (#26701)
  fix: recursive fetch from causes infinite loop (#26695) (#26696)
  fix: Skip letter heads if no permission (backport #26689) (#26691)
  fix: apply perms on letter head selection (backport #26563) (#26582)
  fix(UX): Disable number card filters on standard (#26676) (#26679)
  test: pin cypress
  fix: fail on cypress install failure
  fix: Auto Email Report not working when Add Total Row is enabled (#26667)
  perf: use base32 space for random names instead of base16 (backport #25497) (#26655)
  fix(make_request): don't blindly try to check the content-type
  ...

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants