A recent reply by @pjeby (as PJ) to this blog post was the single best explanation of how Obsidian works and why it’s so powerful and fast. It made me even more convinced that I’ve chosen the right notes and PKM application—and even more grateful to silver and licat and to all the plugin developers.
It also includes some useful tips on making Obsidian work as an outlining app like Roam.
With permission, I’m reposting it here:
I think the public perception of Obsidian by Roamans is based on a combination of outdated information (some of the block indexing I’m describing has only existed for about 9 months) and the lack of highly-visible UI affordances for some (well, most) of the functionality.
For example, Obsidian has always had swap line up/down commands, and indent/outdent commands, not to mention fold-toggling commands that would, in combination, allow you to use it as an outliner.
But the swap up/down commands don’t have a default hotkey assignment, so you have to assign them yourself and know they exist in the first place, and you’d also have to know to enable the “fold indent” setting that lets lists expand and contract. (There’s also an outliner plugin that gives you even better ability to move things around without first selecting all the lines you want to move, but it’s also a relatively recent development.)
Similarly, though Obsidian has more-or-less always had the ability to link and embed blocks and track them in back references, there are many small creature comforts like showing reference counts inline or easily creating a block ID from the block (as opposed to linking to the block from elsewhere) that require a plugin to get a nice UI affordance.
So, if you wanted to capture all the same functionality at the UI level, you would probably need to install the Outliner, Copy Block Link, and perhaps the Zoom plugin as well, that lets you focus on a small part of a note.
(That being said, I would be surprised if adding any of those plugins substantially affected any of your benchmarks aside from startup time, as they mainly provide additional commands, menu items, and hotkeys in the editor.)
Given that the block and outline functions of the core app are basically hidden unless you know which settings to turn on and what commands to add hotkeys for, and that the only way by default to create a block link or embed is the autocompletion when you type (and you have to know to type
[[note name#^^to trigger it), it’s 100% understandable someone could walk away with the impression Obsidian lacks the same outlining and block reference capabilities as Roam. And in truth, to get something close to the “full” experience, you do need the plugins I mentioned. So it is in some sense fair to say “it’s not the same” because of this additional setup/learning curve.
However, the technical argument that “Obsidian’s not the same because it’s not a database” is just flat wrong. Obsidian does have a database, it’s in IndexedDB, and it indexes every paragraph and every line of every list along with block IDs and the hierarchies thereof, and it’s almost-instantly updated whenever the notes change, even if you edit them in another program! Which gives Obsidian a level of ability to integrate with other tools that’s unmatched by the competition.
There are probably other misconceptions as well, such as it not being immediately obvious that Obsidian updates links when you rename files, or that you can have it update links to sections as well by using the “rename this heading” command. There are tons of tools and commands like that, that you’ll be unlikely to discover in the first hour or two of use, and/or were added in the last six months. (If you aren’t involved in the community or follow the releases, you won’t find out a lot about this stuff.)
Anyway, to answer your question about whether there are “real differences” between how Obsidian and Roam work, well absolutely there are. Roam doesn’t have note files stored as markdown, after all. Roam is DB-centric, Obsidian is text-centric.
That is, Obsidian creates its database as a background-updated eventually-consistent index of the text. This is what makes it faster: since the text is primary, it is available and editable right away. While you’re using it, it updates its index in the background, so you are never waiting on the database to do something, it just takes a second or two before secondary views (like tags, backlinks, outline, etc.) will be caught up with whatever you typed.
(And you generally won’t notice that because if you’re typing you’re not looking at things that show you what you changed, you’ll be looking at those things later when you’ve moved to a different note!)
Thus, you could say that Obsidian gets its performance by cheating: it’s cleverly designed so that nearly all the hard work takes place at times and in places where you can’t benchmark it doing so.
Finally, the inner workings I’ve been describing are actually documented on Github, at obsidian-api/obsidian.d.ts at master · obsidianmd/obsidian-api · GitHub – the MetadataCache and its CachedMetadata records describe precisely what information is indexed and how, so that plugins can use it.