github silverbulletmd/silverbullet 2.4.1

9 hours ago

For 2026 I decided to go back to the basics, and revisit some of the foundational stuff that makes SilverBullet work. Making it more robust and performant.

For 2.4 this is primarily about the indexer (on top of which queries are built, among other things). I've run various experiments trying to speed this up, and for my own space (which is now approximating about 2k pages) I managed to roughly speed this up a clean index by 200%. As I did this work, I also added tests to allow to make more improvements here down the line. As usual I encountered some things along the way, and fixed those too.

I also upgraded the fuse.js library, which is used for e.g. the page picker, command picker etc. and tweaked some parameters too. These are hard to test very well, because they're more about "vibes". Let me know if the results work for you.

What's changed

  • Indexer rework (note: upgrading will start a full space reindex automatically):
    • Performance: up to 2x faster
    • Internal refactor, actually adding at least (rudimentary) unit tests now (imagine!)
    • item and task now also index (wiki) links and inherited (wiki) links (links appearing in parent nodes), as requested here under links and ilinks. Updated the "Linked Tasks" widget now to rely on ilinks.
    • Rewrote snippet text for links (used in [[Linked Mention|Linked Mentions]]) to be more contextual, now also includes child bullet items, see community discussion.
    • For consistency with items, task refs now point to the item’s position resulting in a slight positional shift, if you have code relying on this, you may have to adjust it.
    • Disabled indexing all paragraph text by default, this caused significant indexing overhead. See discussion.
      To re-enable: config.set("index.paragraph.all", true)
    • Better link support in frontmatter (by Tomasz Gorochowik)
    • The page:index event now also receives a text and meta attributes.
  • Transclusions improvements:
    • Now have an “eye” button to navigate to the transcluded location
    • Transclusions now only live preview when the cursor is outside of them (as with other pieces of markup)
    • Transclusions now properly support headers
    • Items and tasks are now transcluded with their children (based on @pos notation) (this is mostly helpful when used in queries)
  • Page/document/meta picker tweaks:
    • Upgraded the Fuse.js library and tuned the ranking parameters, hopefully leading to better results.
    • Meta picker now more consistent with page picker
    • You can now use Alt-space to complete a folder matching the first result — try it and let me know how this works for you in practice.
  • Built-in full-text search has been removed from the main distribution, this has now been moved to a separate repo (installable via the library manager). Rationale: full text indexing is expensive and the search results were quite bad. Recommendation: install Silversearch as an alternative.
  • Tasks:
    • Removed: taskstate objects are no more. Custom task states should now be defined using the [[API/taskState]] API.
    • Removed: deadline syntax (legacy syntax from v1) for tasks, please use attributes instead (e.g. [deadline: "2026-01-01"]).
  • New APIs:
    • space.readFileWithMeta(name)
    • space.readPageWithMeta(name)
    • space.readRef(ref)
    • taskState.define(def) (see “Tasks” above)
  • New commands:
    • Navigate: Copy Ref To Current Position
    • Navigate: Copy Link To Current Position
  • Lua:
  • Production builds now include sourcemaps for easier debugging in browser DevTools. If you don't want to serve sourcemaps publicly, you can block *.js.map files at your reverse proxy level (see [[TLS#Blocking sourcemaps]]).
  • Should now deal better with authentication layers (Cloudflare Zero Trust, Authelia, Pangolin)
  • Sync errors now propagate better to the UI
  • Document editors now fixed in Safari (by MrMugame)
  • % now supported in page names
  • Lua widgets “flapping” should now be less

Upgrading

  • Upgrade as usual
  • After upgrading the server, make sure you reload all your SilverBullet tabs a few times, just to make sure the cache is flushed.
  • Note that a full space reindex will automatically kick off, which — while ideally being faster, will still take some time. Caveat here (which I noticed randomly): If you have multiple tabs open with SilverBullet and some still run the old version, you end up in an infinite reindex cycle. Just close other tabs, or reload them to stop this from happening.
  • If you were using some older edge version and somehow get stuck with a never moving index progress indicator, run the Client: Clean command and then run Space: Reindex again, this should solve the issue.

Dedication

I've made the decision to reduce my regular day job to fewer days and spend this time on SilverBullet. This allows for deeper focus and more ambitious work. If you like this, consider sponsoring to make this a little bit more financially sensible for me.

Don't miss a new silverbullet release

NewReleases is sending notifications on new releases.