Commit Graph

234 Commits

Author SHA1 Message Date
Jon Staab 09e687ab05 Remove promenade and pomade stuff from signer package 2026-01-13 10:25:29 -08:00
Jon Staab e9b1172d15 Add doLet util 2025-12-17 17:43:35 -08:00
Jon Staab 780148a31e Add a few utils, fix relay fetching 2025-12-12 13:28:48 -08:00
Jon Staab 483fff2fbb Bump version to 0.7.1 2025-12-05 09:47:08 -08:00
Jon Staab d81ec62d2b Add since to reqs that get re-opened to avoid re-downloading and gaps in active subscriptions. Also add some getters for event stores and event sort utils 2025-12-04 15:16:56 -08:00
Jon Staab 2381c29799 Bump version to 0.7.0 2025-12-02 13:18:38 -08:00
Jon Staab 351b60631e Move key stuff to util, add pow util 2025-12-02 13:15:24 -08:00
Jon Staab 52785afb10 Fix some bugs 2025-11-25 14:54:10 -08:00
Jon Staab 250f5c772f Fix some bugs with deriving events by url 2025-11-24 09:52:47 -08:00
Jon Staab 2fec078a5b Update docs, tweak url based event derivation 2025-11-20 15:08:59 -08:00
Jon Staab de5695339d 1. throttle (line 1146-1174)
Before: Used recursive setTimeout calls via unpause, creating nested closures and multiple timer contexts.

After:
- Tracks a single timeoutId to manage timer lifecycle
- Eliminates nested closure creation
- Cleaner timer chain when calls are pending

2. batch (line 1204-1227)

Before: Used throttle internally, inheriting its timer overhead.

After:
- Direct timer management without the throttle wrapper
- Single timeoutId tracked explicitly
- Maintains the same semantics (first item processed immediately, rest batched)

3. batcher (line 1235-1259)

Before:
- Created new timer every time queue went from empty to non-empty
- Had unnecessary async in forEach and await r when r was already type U

After:
- Tracks timeoutId to prevent duplicate timer creation
- Only creates timer when queue is truly empty
- Removed unnecessary async/await in result handling
- More efficient error handling (rejects all items at once if length mismatch)

Performance Benefits:

These changes should significantly reduce timer overhead by:
- Fewer timer objects: Only one active timer per throttled/batched function instead of chains
- Less garbage collection: Fewer closure allocations and intermediate objects
- Better memory usage: Explicit timer ID tracking instead of implicit state in closures
2025-11-14 15:29:03 -08:00
Jon Staab 24860c9a02 Add prepend util 2025-11-12 11:06:13 -08:00
Jon Staab cc17711dc0 Bump version 2025-11-11 14:06:34 -08:00
Jon Staab e582d46afd Break down relay utils, replace removeNil with removeUndefined 2025-11-11 14:05:30 -08:00
Jon Staab 4c1c138329 Forget about null, use undefined 2025-11-06 12:10:24 -08:00
Jon Staab d04284cde8 Bump version 2025-11-06 11:12:04 -08:00
Jon Staab 5345cc1405 Bump version 2025-11-05 11:50:02 -08:00
Jon Staab b0718ec840 Bump version 2025-11-05 09:39:03 -08:00
Jon Staab 2d75d9de6f Bump to 0.6.4 2025-11-04 17:00:37 -08:00
Jon Staab 8426febcdf Memoize some stores, improve room support 2025-11-03 13:26:47 -08:00
Jon Staab 3132b8c59a Make sorting/limit more resilient in repository 2025-10-28 13:23:25 -07:00
Jon Staab e2bdb88cc2 Fix compilation error, add mergeRepositoryUpdates 2025-10-27 10:39:36 -07:00
Jon Staab c386e21321 Bump version 2025-10-24 06:43:31 -07:00
Jon Staab a03a289e93 Improve relay tracking with thunks, add/rename some kinds 2025-10-24 06:41:56 -07:00
Jon Staab c026084635 Bump version 2025-10-20 15:18:09 -07:00
Jon Staab 247c7bafeb Add wrap manager for tracking gift wraps 2025-10-20 14:19:44 -07:00
Jon Staab 543dbda64f Make thunks an array instead of an object 2025-10-20 14:19:44 -07:00
Jon Staab a418350b53 Bump version 2025-10-17 10:10:23 -07:00
Jon Staab 9e9a1d5d28 Bump version 2025-10-13 15:08:42 -07:00
Jon Staab d4a6873ed5 Generalize some utils 2025-10-13 13:41:53 -07:00
Jon Staab 5c03ff3e29 Pass pubkey to nip 55 signer to avoid mixing up sessions 2025-10-13 11:20:01 -07:00
Jon Staab 846d274e83 Bump version 2025-10-06 11:12:54 -07:00
Jon Staab 0ada7d4b29 Optimize some utils 2025-10-03 10:11:07 -07:00
Jon Staab 0ab74612bf remove some typedoc files 2025-10-02 17:49:26 -07:00
Jon Staab d01f844078 Re-work publish/thunk status 2025-10-01 16:59:16 -07:00
Jon Staab a2d519766d Bump version, drop storage stuff 2025-09-30 15:55:18 -07:00
Jon Staab beadfc571c Move deduplicateEvents to util 2025-09-17 09:41:20 -07:00
Jon Staab 599e6a5085 Add some type utils, findFeed, and fix feed listener to use limit: 0 instead of since 2025-09-09 16:20:21 -07:00
Jon Staab 9a476d2c30 Fix getCompleteThunkUrls 2025-09-08 09:42:59 -07:00
Jon Staab 8716d1fdb1 Update docs, bump version 2025-09-05 09:33:02 -07:00
Jon Staab 3b99cb7d4c Fix throttle function, add retryAuth 2025-09-03 17:31:19 -07:00
Jon Staab c63d9086c6 Bump version 2025-08-26 11:06:03 -07:00
Jon Staab 00c0497892 Add anonymous session, re-work thunk utilities 2025-08-19 14:03:28 -07:00
Jon Staab 3b4fe0973d Validate url in fetch, rework some hints 2025-08-05 17:26:18 -07:00
Jon Staab dc9a873d92 Fix list loading in feeds hanging and pagination in feeds with since/until 2025-07-25 11:04:28 -07:00
Jon Staab 16ca2b53ac Bump version 2025-07-17 14:24:37 -07:00
Jon Staab 184579d26b Bump version 2025-07-09 13:42:10 -07:00
Jon Staab 41fe5f4cb0 Bump version 2025-07-03 10:01:04 -07:00
Jon Staab c54225380e Add alert kinds, minor tweaks, bump version 2025-06-30 10:52:03 -07:00
Jon Staab 24acae704d Improve socket auth, outbox loading, some other things 2025-06-19 12:51:05 -07:00