mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-07 21:22:34 +01:00
⚡ Improve performance for large-scale block deletion/insertion https://github.com/siyuan-note/siyuan/issues/16644
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
parent
80faba6c75
commit
89952fa8b4
6 changed files with 181 additions and 217 deletions
|
|
@ -825,9 +825,7 @@ func (tx *Transaction) removeBlocksDeckAttr(blockIDs []string, deckID string) (e
|
|||
node.SetIALAttr("custom-riff-decks", val)
|
||||
}
|
||||
|
||||
if err = tx.writeTree(tree); err != nil {
|
||||
return
|
||||
}
|
||||
tx.writeTree(tree)
|
||||
|
||||
cache.PutBlockIAL(blockID, parse.IAL2Map(node.KramdownIAL))
|
||||
pushBroadcastAttrTransactions(oldAttrs, node)
|
||||
|
|
@ -921,9 +919,7 @@ func (tx *Transaction) doAddFlashcards(operation *Operation) (ret *TxErr) {
|
|||
val = strings.TrimSuffix(val, ",")
|
||||
node.SetIALAttr("custom-riff-decks", val)
|
||||
|
||||
if err := tx.writeTree(tree); err != nil {
|
||||
return &TxErr{code: TxErrCodeWriteTree, msg: err.Error(), id: deckID}
|
||||
}
|
||||
tx.writeTree(tree)
|
||||
|
||||
cache.PutBlockIAL(blockID, parse.IAL2Map(node.KramdownIAL))
|
||||
pushBroadcastAttrTransactions(oldAttrs, node)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue