mirror of
https://github.com/org-roam/org-roam
synced 2025-08-03 12:27:23 -05:00
(perf)db: wrap update-file in sql transaction (#1827)
This should lead to some performance gains on buffers with lots of inserts required (e.g. when the buffer has a lot of links).
This commit is contained in:
@ -8,6 +8,7 @@
|
|||||||
### Changed
|
### Changed
|
||||||
- [#1795](https://github.com/org-roam/org-roam/pull/1795) buffer: optimized reflinks fetch
|
- [#1795](https://github.com/org-roam/org-roam/pull/1795) buffer: optimized reflinks fetch
|
||||||
- [#1809](https://github.com/org-roam/org-roam/pull/1809) capture: the mandatory `:if-new` property of each capture template is now renamed to `:target`
|
- [#1809](https://github.com/org-roam/org-roam/pull/1809) capture: the mandatory `:if-new` property of each capture template is now renamed to `:target`
|
||||||
|
- [#1829](https://github.com/org-roam/org-roam/pull/1829) perf: file sql updates are now wrapped in a transaction
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- [#1798](https://github.com/org-roam/org-roam/pull/1798) org-roam-node-at-point: do not skip invisible headings
|
- [#1798](https://github.com/org-roam/org-roam/pull/1798) org-roam-node-at-point: do not skip invisible headings
|
||||||
|
@ -495,6 +495,7 @@ If the file exists, update the cache with information."
|
|||||||
info)
|
info)
|
||||||
(unless (string= content-hash db-hash)
|
(unless (string= content-hash db-hash)
|
||||||
(org-roam-with-file file-path nil
|
(org-roam-with-file file-path nil
|
||||||
|
(emacsql-with-transaction (org-roam-db)
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(org-set-regexps-and-options 'tags-only)
|
(org-set-regexps-and-options 'tags-only)
|
||||||
(org-roam-db-clear-file)
|
(org-roam-db-clear-file)
|
||||||
@ -514,7 +515,7 @@ If the file exists, update the cache with information."
|
|||||||
(when (require 'org-cite nil 'noerror)
|
(when (require 'org-cite nil 'noerror)
|
||||||
(org-roam-db-map-citations
|
(org-roam-db-map-citations
|
||||||
info
|
info
|
||||||
(list #'org-roam-db-insert-citation))))))))
|
(list #'org-roam-db-insert-citation)))))))))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun org-roam-db-sync (&optional force)
|
(defun org-roam-db-sync (&optional force)
|
||||||
|
Reference in New Issue
Block a user