I think your ideas are good, but I think they lack scalability.
And that’s the crux. IMO The assumption is wrong, because it does not scale well. If something should land in the core, we have to have the bigger picture in mind. TW does not win a popularity contest, but we can assume that there are 10000 users / wikis out there.
The question for collision probability here is: How many tiddlers do we need in 2 wikis, where we have a probability from 1 out of x that there is a collision.
The answer for x is 448, with the following assumptions:
- There are 10000 wikis, that use this mechanism
- 30 Tiddlers per day are produced
- We have a 9 hours per day, where tiddlers are produced.
- Since TW stores the date format with UTC format,
- Tiddler creation times are when users are awake. So there will be ranges which are the same world wide. (Increasing it to 14h per day - does not matter as much as I thought. See the details.)
- We look at the probability of a collision after 10 years from now
The full details can be found at https://claude.ai/share/6f86c7b9-e7fe-4764-9b41-02fa8d8544ce … I am not a mathematician, but the calculations look reasonable.
The main problem with collision probabilities is the Birthday problem, which states:
From wikipedia:
The birthday problem asks for the probability that, in a set of n randomly chosen people, at least two will share the same birthday.
Here the number is 23 for a 50% chance of a “collision”. This number is incredibly low, compared to the 356 numbers of day per year.
Why this matters? - The created date down to the millisecond can be considered the birthday of a tiddler. Our ranges are much higher considered we have much higher possible number of keys.
But still with some reasonable assumptions: We have 10000 wikis, that produce 30 tiddlers a day. Ranges created within 9h per day with 250 working days.
You can see the details in the linked conversation with Claude near the end.
- Claude does suggest to use more 4 digits to be “safer”. … But I would say:
- That’s still not good enough.
Even with the early numbers, where we did consider the whole future number range for 130 years, it would not be good enough in my books. Where we have 1 in 1000 with 12000 tiddlers per wiki. That’s “concerning” to use the LLMs words.
Here is the conversation as an MD file, that you can feed own LLM, to verify or “to slate” it.
timestamp_collision_conversation.md.tid (8.4 KB)
From your replies I can see, that you want to use the created date field, since it is already there. So no extra “space” needed. So tiddler size does not increase.
- But with 4 extra digits as Claude suggested, we do need more space
- As I wrote, I think that is not good enough.
- If we do already need more space we can make it bullet-proof
Some time ago I did post a similar “train of thoughts” at GitHub: Using New UUID v7 as a Tiddler ID for MWS Related Data Storages · TiddlyWiki/TiddlyWiki5 · Discussion #9035 · GitHub
Which also suggests to use a new created field with a really unique format. UUID v7
- The properties are the same as with your changes
- It’s transparent for users - The do not even see it
- Implementation should be straight forward
- We can do it at import time
- We can create an automatic upgrader, so users do not need to do anything
The OP is long, but I think the implementation done in the right places will only be a view lines of code.
The crux with my suggestion
Off course it also has one (or more
UUIDs are horrible to “remember” by users.
The UUID contains this timestamp: 2026-03-12 16:40:23.524 UTC in the bold section. The rest are random numbers in the italic section. 7 is the version number.
UUID-v7: 019ce2eb-b2e4-739b-bd29-4f9b77c76b04
vs.
created: 20260312164023524
But if you want to use your “uniquified” date as links to tiddlers, it also is hard to read by humans.
Aliasing those IDs is an interesting idea, that we may follow. … But this will cost additional “space”
Just some thoughts.
have fun!
Mario