Skip to content

chore: improve id generation#2584

Open
sdirix wants to merge 2 commits into
masterfrom
id-generation
Open

chore: improve id generation#2584
sdirix wants to merge 2 commits into
masterfrom
id-generation

Conversation

@sdirix
Copy link
Copy Markdown
Member

@sdirix sdirix commented May 28, 2026

  • Makes id generation overridable
  • Improves the worst case in current id generation by keeping tab on the next open count
  • Keeps current visible behavior the same as before

Related to #2383

sdirix added 2 commits May 28, 2026 15:55
Introduces an `Id` object holding `createId`, `removeId` and `clearAllIds`
references and routes all renderer-set callers through it.
Adopters can now swap the default implementations.
`createId` previously rescanned the global id set from index 0 on every
call. With N identical proposed ids this is O(N^2).

Track a per-prefix `next` cursor and a reverse map from id to slot so
the scan starts at the lowest unallocated index. `removeId` reuses
freed slots by rewinding the cursor. All previously observable
behavior is preserved.
@sdirix sdirix requested a review from lucas-koehler May 28, 2026 14:16
@netlify
Copy link
Copy Markdown

netlify Bot commented May 28, 2026

Deploy Preview for jsonforms-examples ready!

Name Link
🔨 Latest commit 113c10c
🔍 Latest deploy log https://app.netlify.com/projects/jsonforms-examples/deploys/6a184e4b4ea61b00089a1297
😎 Deploy Preview https://deploy-preview-2584--jsonforms-examples.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coveralls
Copy link
Copy Markdown

Coverage Status

coverage: 83.619% (+0.7%) from 82.946% — id-generation into master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants