decaf-dev / obsidian-dataloom

Weave together data from diverse sources and display them in different views. Inspired by Excel spreadsheets and Notion.so.
https://dataloom.xyz/
MIT License
914 stars 33 forks source link

Obsidian slows down after opening each new page containing a dataloom table, even if it is immediately closed #809

Open 42ama opened 11 months ago

42ama commented 11 months ago

Describe the bug

I noticed that when working in Obsidian with pages that contain Dataloom, it starts to run slower. Therefore, I conducted a test where I opened and immediately closed one hundred pages that contain Dataloom tables. The memory usage by Obsidian at the beginning of the test was 274MB. After the test, it increased to 498MB. It appears that some of the resources used by the tables are not being disposed properly. Even though the increase in memory usage is small (considering I have a total of 32GB RAM), the decrease in speed is noticeable. Here is a GIF showing the speed of page changes before and after the Obsidian startup and the test. Obsidian_SlowDown_Bug-optimize

Steps to reproduce

  1. Prepare two obsidian pages that contain embedded tables from Datatloom and are linked to each other.
  2. Begin by clicking on the links that lead from one page to another in a continuous loop.
  3. Eventually, you will notice a decrease in speed.

Expected behavior

There is no decrease in speed. Reproducing this scenario on plain obsidian pages does not result in a decrease in speed.

Are you using the mobile app?

No

Obsidian debug info

SYSTEM INFO:
    Obsidian version: v1.4.14
    Installer version: v1.4.13
    Operating system: Windows 10 Pro 10.0.19045
    Login status: not logged in
    Insider build toggle: off
    Live preview: on
    Legacy editor: off
    Base theme: light
    Community theme: none
    Snippets enabled: 0
    Restricted mode: off
    Plugins installed: 23
    Plugins enabled: 19
        1: Templater v1.16.4
        2: TagFolder v0.18.3
        3: Excalidraw v1.9.23
        4: Dataview v0.5.61
        5: Advanced Tables v0.19.1
        6: Periodic Notes v0.0.17
        7: Rollover Daily Todos v1.1.7
        8: Admonition v10.1.1
        9: Obsidian Git v2.22.0
        10: Emoji Toolbar v0.4.1
        11: DataLoom v8.7.2
        12: Calendar v1.5.10
        13: Underline v1.2.1
        14: Surfing v0.8.16
        15: Editor Syntax Highlight v0.1.3
        16: Numerals v1.2.0
        17: Homepage v3.5.2
        18: Buttons v0.4.19
        19: Find orphaned files and broken links v1.9.1

RECOMMENDATIONS:
    Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.

Relevant log output

No response

decaf-dev commented 11 months ago

Hey @42ama. Thanks for posting this. Are you sure it's a memory issue? If you have 32GB of memory, I don't believe it should be acting like this. Could you check your CPU usage to make sure that Obsidian isn't maxing out one of your cores?

42ama commented 11 months ago

@trey-wallis Yes, you're correct. It is primarily linked to CPU usage. The initial two ramp-ups happened, during reproducing a decrease in speed by clicking on two circular links to pages with embedded Datalooms. The later four spikes occur while clicking on a link and waiting for the page to load. image

42ama commented 11 months ago

After version 8.8.0, the situation has improved, but the bug is still reproducible.

decaf-dev commented 11 months ago

I will look into this soon. There are a lot of bugs that need squashing.