Root cause:
get-bidirectional-properties was recomputing
bidirectional-property-attr? for every [e a] match, repeatedly calling
d/entity for the same property attr keyword. That made cost scale with
datom count, not unique properties.
Fix:
Added per-call memoization for property-attr bidirectional checks
using a local volatile! cache, so each attr is resolved once per
invocation.
For keys with non-ordered collections, use sets to consistently produce
idempotent values. Users can still author with vectors for these keys.
This affects :build/tags, :build/property-classes and
:build/class-extends. Also remove any hacks around making their values
consistent across import->export cycles
Fixed the setup of these tests and then was able to confirm that
built-in pages are idempotent with import-export process. Also fixed
related docstrings
An EDN export should consistently produce the same EDN when imported
into a new graph and re-exported. This adds initial fn, cli option and
test to ensure this. There are some known TODOs. diff-graphs script was
removed as it was being used as a subset of the workflow provided by the
--roundtrip option
except for graph-parser and publish deps
- Removed most mentions of 'repo' in deps, which cleaned up a lot related
to export cli and worker
- Removed db-based-graph? checks in deps except for unknown use
in entity-plus?
- Removing db-based-graph? checks resulted in deleting unused file graph
code paths e.g. get-pid
- Removed file graph handling in cli list command
- Remove file-based-graph? checks from deps
Previously `tags` doesn't return blocks that have children tag(s).
Also, `tags` support both db/ident and block/title to make it easy
to use:
(tags ?b #{144})
(tags ?b #{"Task"})
(tags ?b #{:logseq.class/Task})
* perf: separate scalar from ref property query
* fix: query bindings
* perf: separate default value query from others
* fix: import properties first and then other datoms
with :build-existing-tx? option. Makes behavior consistent with blocks.
This also fixes built-in pages that weren't re-importing correctly
w/ modified properties
Add current block support and error handling.
Also update most uses of build-import to call d/transact! once
afterwards. Previously I think we needed separate transacts because of
new properties but that is no longer the case
1. When sorting properties, consider cases where values are nil or blocks/orders are identical.
2. If block/order are nil or duplicated in sorted-properties, recalculate and transact them
* feat: quick add
* enhance(ux): auto open block for editing for quick add
* enhance(ux): show notification after quick add
* add migration for quick add page