tldraw Profile Banner
tldraw Profile
tldraw

@tldraw

Followers
71K
Following
7K
Media
2K
Statuses
5K

infinite canvas | https://t.co/oXL4NAc6P8 | https://t.co/dO6WPp6YOI | https://t.co/beo7WsKiVe | /tiː ɛl drɔː/

London
Joined February 2021
Don't wanna be here? Send us removal request.
@tldraw
tldraw
13 days
Fairies are live on https://t.co/dAGY8BIosE 🧚 $25 DECEMBER ONLY
11
28
347
@tldraw
tldraw
2 hours
It just needs to be extremely fast. Faster better. Fast fast fast. sonic.jpg
1
0
2
@tldraw
tldraw
2 hours
We do this kind of runtime validation on every change to the main record store (for shapes, pages, users, etc). It’s such a good safety net, especially when bad data (null values, unexpected signs) risk being persisted or propagated to collaborators.
1
0
1
@tldraw
tldraw
2 hours
This kind of optimization is eminently Claudable. Set up benchmarks, run them against main and output to md file, and then branch and iterate against those results. Local bench is fine because we’re just interested in relative improvements.
1
0
1
@tldraw
tldraw
2 hours
There were lots of other small improvements too, such as moving a dev-time check, skipping some nesting on extended validators, and skipping some other checks when recursing.
1
0
0
@tldraw
tldraw
2 hours
So rather than checking if the number is NaN and returning early with an error, then checking for finite and returning early with an error, or else returning success, we check for success immediately and then, if it failed, make those other checks to determine _why_ it failed.
1
0
0
@tldraw
tldraw
2 hours
We also moved things around, optimizing for the expected path at the cost of making the error path slower.
1
0
0
@tldraw
tldraw
2 hours
The big speed up was in how we checked whether a value was a number or not. Beyond the typeof, we previously used both typeof and Number.isNaN and Number.isFinite. This was actually redundant: isFinite was all we needed.
1
0
0
@tldraw
tldraw
2 hours
In the next version of tldraw, our runtime validation system is about twice as fast. It was already pretty fast! but now it’s faster.
2
1
19
@tldraw
tldraw
2 hours
this was a good release, where we rewrote our geometry system for greater control over hit tests / collisions
@tldraw
tldraw
2 years
It's been about three months since our last release. We've got a big one coming this week with some ~~deep quality improvements~~
0
0
18
@SonyxEth
sonyx.eth
3 hours
In my newest gen ai research experiment i used @tldraw fairies to generate a flowchart for a research organizer app and then used the flowchart to generate fully working aaa research organizer app w @GeminiApp
0
1
2
@tldraw
tldraw
17 hours
help I’m being bullied by the systems languages community
15
3
162
@tldraw
tldraw
2 days
In the next version of tldraw, we fix a very entertaining bug that would effect flipping rotated shapes that include freehand shapes.
0
5
51
@therealdanvega
Dan Vega
2 days
Probably my favorite feature in @tldraw Past in a link and it creates these nice graphics from it 🤩
5
11
138
@tldraw
tldraw
2 days
We're hoping to find more places to ship less code and sync fewer bytes. If you're into this kind of thing, you can read through the pull request here:
Tweet card summary image
github.com
This PR reduces the storage size of draw and highlight shapes by encoding point data as base64 strings using Float16 representation instead of JSON arrays of VecModel objects. Each point (x, y, z) ...
0
0
35
@tldraw
tldraw
2 days
Resizing draw shapes should now be faster too. Previously, we would rescale points during resize to fix the shape's new bounding box. We now store the differences in x/y scale separately and multiply at render time. Less work to do and less to sync.
1
0
27
@tldraw
tldraw
2 days
It might also help with performance. Although the points are stored in a compressed format, we don't need to decode the whole array in order to access points. We are able to selectively decode any point within the compressed array because the bits in the array are regular.
3
0
39
@tldraw
tldraw
2 days
This is meant to address a common issue we've seen where files containing many hand-drawn shapes would become unexpectedly large, leading to slower loading times and synchronization. Those files should be up to 80% smaller now.
1
0
71
@tldraw
tldraw
2 days
In the next version of tldraw, we're introducing a compressed format for storing points for freehand shapes. Each point (x, y, z) is now encoded as 6 bytes (3 Float16 values) = 8 base64 characters, compared to approximately 40+ bytes per point in the previous JSON format. This
41
18
914
@tldraw
tldraw
2 days
soft ware makes hard times
3
6
75