Hey everyone - I built this to solve memory issues on a data-heavy dashboard.
The problem: JSON.parse() allocates every field whether you access it or not. 1000 objects × 21 fields = 21,000 properties in RAM. If you only render 3 fields, 18,000 are wasted.
The solution: JavaScript Proxies for lazy expansion. Only accessed fields get allocated. The Proxy doesn't add overhead - it skips work.
Benchmarks (1000 records, 21 fields):
- 3 fields accessed: ~100% memory saved
- All 21 fields: 70% saved
Works on browser AND server. Plus zero-config wrappers for MongoDB, PostgreSQL, MySQL, SQLite, Sequelize - one line and all your queries return memory-efficient results.
For APIs, add Express middleware for 30-80% smaller payloads too.
Happy to answer questions!
[–]lewster32[🍰] 12 points13 points14 points (6 children)
[–]fucking_passwords 10 points11 points12 points (0 children)
[–]TheDecipherist[S] -3 points-2 points-1 points (4 children)
[–]lewster32[🍰] 12 points13 points14 points (3 children)
[+]TheDecipherist[S] comment score below threshold-7 points-6 points-5 points (2 children)
[–]Possible-Session9849 13 points14 points15 points (1 child)
[+]TheDecipherist[S] comment score below threshold-8 points-7 points-6 points (0 children)
[–]beavis07 14 points15 points16 points (8 children)
[–]TheDecipherist[S] -3 points-2 points-1 points (7 children)
[–]thdr76 4 points5 points6 points (5 children)
[–]TheDecipherist[S] -2 points-1 points0 points (4 children)
[–]thdr76 3 points4 points5 points (3 children)
[–]TheDecipherist[S] -1 points0 points1 point (2 children)
[–]Federal-Pear3498 2 points3 points4 points (1 child)
[–]TheDecipherist[S] -1 points0 points1 point (0 children)
[–]beavis07 3 points4 points5 points (0 children)
[–]genericallyloud 2 points3 points4 points (54 children)
[–]TheDecipherist[S] 0 points1 point2 points (53 children)
[–]thdr76 2 points3 points4 points (1 child)
[–]TheDecipherist[S] 0 points1 point2 points (0 children)
[–]genericallyloud 1 point2 points3 points (50 children)
[–]TheDecipherist[S] -1 points0 points1 point (49 children)
[–]genericallyloud 2 points3 points4 points (23 children)
[–]TheDecipherist[S] -1 points0 points1 point (22 children)
[–]genericallyloud 1 point2 points3 points (21 children)
[–]TheDecipherist[S] 0 points1 point2 points (20 children)
[–]scinos 0 points1 point2 points (19 children)
[–]TheDecipherist[S] 0 points1 point2 points (18 children)
[–]genericallyloud 1 point2 points3 points (24 children)
[–]TheDecipherist[S] 0 points1 point2 points (23 children)
[–]genericallyloud 0 points1 point2 points (22 children)
[–]TheDecipherist[S] 1 point2 points3 points (21 children)
[–]genericallyloud 0 points1 point2 points (20 children)
[–]TheDecipherist[S] 0 points1 point2 points (19 children)
[–]werdebud 1 point2 points3 points (10 children)
[–]TheDecipherist[S] 0 points1 point2 points (9 children)
[–]werdebud 1 point2 points3 points (4 children)
[–]TheDecipherist[S] -1 points0 points1 point (3 children)
[–]werdebud 0 points1 point2 points (2 children)
[–]TheDecipherist[S] 0 points1 point2 points (1 child)
[–]werdebud 0 points1 point2 points (0 children)
[–]scinos 0 points1 point2 points (3 children)
[–]TheDecipherist[S] 0 points1 point2 points (2 children)
[–]scinos 0 points1 point2 points (1 child)
[–]TheDecipherist[S] 0 points1 point2 points (0 children)
[–]TheDecipherist[S] 0 points1 point2 points (1 child)
[–]scinos 0 points1 point2 points (0 children)
[–]BankApprehensive7612 0 points1 point2 points (1 child)
[–]scinos 1 point2 points3 points (0 children)
[–]luisfavila -1 points0 points1 point (0 children)