zsviczian / obsidian-excalidraw-plugin

A plugin to edit and view Excalidraw drawings in Obsidian
3.69k stars 202 forks source link

FR: Ideas for Performance Improvements for Embedded Drawings #1866

Open vladimirzb opened 5 days ago

vladimirzb commented 5 days ago

Is your feature request related to a problem? Please describe. First off, thank you for the amazing work on the Excalidraw plugin! It has significantly enhanced my note-taking experience with Obsidian. However, I have encountered some performance issues when using the "Embed" feature to include parts of various Excalidraw drawings into my markdown (md) files. When I first open these md files, there is significant lag, and on older computers, this sometimes even causes Obsidian to crash.

Describe the solution you'd like

  1. Loading Page: Implement a loading screen or placeholder that prevents scrolling until all Embed relationships are fully loaded. This would improve the initial user experience by avoiding the laggy performance and potential crashes.
  2. Caching Mechanism: Introduce a caching system for the embedded drawings. This way, the plugin doesn't have to reload all references every time the file is opened. Ideally, this caching system could offer two options:
    • Full Reload: Refresh all embedded content.
    • Selective Reload: Allow the user to refresh only specific embedded drawings that have been updated, rather than reloading everything.

Describe alternatives you've considered Currently, there are no alternatives that effectively address these performance issues.

Additional context These enhancements would greatly improve the usability and performance of the plugin, especially for users with older laptops and smartphones using Obsidian.

zsviczian commented 5 days ago

Caching is already implemented. Do you have it disabled by any chance? Find it under "Embedding Excalidraw into your Notes and Exporting" image

Placeholders are an interesting idea. I'll think about their implementation.