https://www.dendron.so/ logo
Join Discord
Powered by
# questions
  • s

    SeriousBug

    01/17/2022, 8:05 AM
    I'm not sure if that's something that was planned, let me ping @User so he can answer when he's online. I don't see it in the documentation so I'm not sure. Looking into the code, it uses lodash's templating capabilities which include javascript evaluation, but I could see that being a potential source of vulnerability so we might want to at least restrict it a bit (perhaps disable it for "untrusted workspaces")
  • s

    SeriousBug

    01/17/2022, 8:06 AM
    I'll also tag in @User who I think worked last on this
  • m

    mihaiconstantin

    01/17/2022, 8:09 AM
    I browsed the code trying to find more undocumented template variables, and noticed the
    _.template(note.body)
    . If this is not intended (e.g., for note traits or something else), I think it makes sense to disable it for untrusted workspaces, as you said. Curious what the others think as well. Thanks for pinging them.
  • g

    geetuu

    01/17/2022, 10:16 AM
    I usually have a lot of images in my notes, I'm scared the performance might take a hit, since all the images are stored in a single folder, and the count may be crazy. Am I being paranoid or is this a valid concern?
  • s

    SeriousBug

    01/17/2022, 10:18 AM
    Modern operating systems are pretty efficient so I wouldn't be too concerned with it. You could always split things into multiple vaults though if you experience issues. (And let us know so we can build something to handle images better!)
  • g

    geetuu

    01/17/2022, 10:20 AM
    Thanks for the answer, I have a stupid question along the same lines - say there is a file called foo.bar, why aren't we storing it in folder structure foo/bar in the vault itself, is there obvious reasoning that I'm missing here?
  • g

    geetuu

    01/17/2022, 10:22 AM
    The reason I'm asking this is, that's how I used to save my notes and achieve hierarchy with plain text files, and used paste image vs code extension to save images, and the images will be saved in the same folder - these were intuitive and made sense - when I was not using any additional software. I'm sure you must have analyzed and there must be some reasoning that I'm missing, so I'm just curious
  • s

    SeriousBug

    01/17/2022, 10:22 AM
    I think the docs explain this better than I can. There are definitely advantages and disadvantages to both methods (folders vs. dot hierarchies), but we think the dots are more flexible and useful: https://wiki.dendron.so/notes/f3a41725-c5e5-4851-a6ed-5f541054d409/#why-hierarchies
  • t

    Tika

    01/17/2022, 10:41 AM
    Well, I think images should also follow the dot convention. Maybe even live next to notes as @User suggested.
    foo.bar.md
    foo.bar.flower.jpg
    foo.bar.tree.png
    See a partially relevant discussion here https://github.com/dendronhq/dendron/issues/1450 and add or upvote as desired.
  • g

    geetuu

    01/17/2022, 10:49 AM
    Say there are 1000 notes, and then there will be 1000 files in the root folder, and that somehow seems weird to me, having a hard time digesting that.
  • g

    geetuu

    01/17/2022, 10:49 AM
    the same goes for images
  • t

    Tika

    01/17/2022, 10:55 AM
    I have seen two cases with many tens of thousands of small files in one folder. Lightroom databases and dictionaries. In both cases, copying, backing up, etc. become very slow and error prone. I imagine 1000 will be fine. What is currently a problem as that Paste Image converts everything into PNG. For photographs this can mean a tenfold or more increase is file size if the original is a JPG, without any benefits. This can start breaking GitHub storage limits, etc. etc. with thousands of files. There is an issues about this one too: https://github.com/dendronhq/dendron/issues/941
  • t

    Tika

    01/17/2022, 10:56 AM
    I guess one could simulate such file volumes and test?
  • d

    David

    01/17/2022, 10:57 AM
    Is there a way to link to a Dendron note from within Mermaid? In the markup below, for example, the first links works, the second doesn't.
    Copy code
    mermaid
    flowchart TD;
        A --> B
        click A "https://www.dendron.so"
        click B "[[one.two.three]]"
  • m

    mihaiconstantin

    01/17/2022, 11:22 AM
    I am having a hard time understanding where the`CSS` for customizing tags needs to be placed. The link in the docs that was supposed to discuss this seems invalid: https://www.dendron.so/notes/683740e3-70ce-4a47-a1f4-1f140e80b558.html#can-i-customize-the-markdown-preview-css. Do you have any ideas where I can find that info?
  • m

    mihaiconstantin

    01/17/2022, 11:56 AM
    I understand the feeling. I felt the same and had to constantly remind myself that I actually prefer it this way because it reduces the friction of wondering where to store things. Dendron also seems to encourage the use of the Lookup Bar instead of the VSCode Explorer view. I went a bit extreme and forced myself to use Dendron exclusively through the Lookup Bar and the Command Palette by hiding everything in the explorer:
    Copy code
    json
    // .vscode/settings.json
    {
        "files.exclude": {
            "**/.vscode": true,
            "**/.dendron.cache.json": true,
            "**/*schema.yml": true,
            "**/*.md": false
        }
    }
    More recently I started creating schemas (i.e., as some sort of a flexible alternative for folders) to have a sense of organization and to more look up notes faster.
  • g

    geetuu

    01/17/2022, 11:59 AM
    Logically it makes sense, but my system1 thinking is against it haha. I haven't gotten into schemas yet, but yeah, guess I will be sticking with Dendron for now, worst case down the line, I will write a migration script to put into folders
  • m

    mihaiconstantin

    01/17/2022, 12:00 PM
    I was curious about your question and generated 100k notes as follows (i.e., note that the note ID is not a valid Dendron ID):
    Copy code
    bash
    #!/bin/bash
    
    for i in {1..100000};
    do
        echo "---" >> "note.test$i.md"
        echo "id: $(openssl rand -hex 11)" >> "note.test$i.md"
        echo "title: Test" >> "note.test$i.md"
        echo "desc: ''" >> "note.test$i.md"
        echo "updated: 1642417675995" >> "note.test$i.md"
        echo "created: 1642417180575" >> "note.test$i.md"
        echo "---" >> "note.test$i.md"
        echo "# Note" >> "note.test$i.md"
    done
    The VSCode explorer does lag. Starting Dendron takes some time (I think it is indexing). My Finder (equivalent to Explorer on Windows) handles the files well.
  • m

    mihaiconstantin

    01/17/2022, 12:00 PM
    I will let you know how well the Lookup Bar performs once Dendron has finished starting.
  • s

    SeriousBug

    01/17/2022, 12:00 PM
    Dendron's markdown export pod will helpfully put them into folders for you if you ever need it!
  • s

    SeriousBug

    01/17/2022, 12:01 PM
    Dendron has to read each note the first time. Could you also try restarting and see how long the second start takes?
  • m

    mihaiconstantin

    01/17/2022, 12:02 PM
    Sure thing. But I think I first have to wait for the first read to complete---still in progress.
  • s

    SeriousBug

    01/17/2022, 12:02 PM
    I don't think that's supported, could you please send a feature request for it?
  • t

    Tika

    01/17/2022, 12:03 PM
    @User Cool, curious to see the stats. Are these fake notes empty? Properly, you'd want to put in some text with links as I guess this will impact the indexing...
  • m

    mihaiconstantin

    01/17/2022, 12:06 PM
    Indeed, let me adjust the script to include some links.
  • m

    mazma

    01/17/2022, 12:07 PM
    Afternoon all, is the markdown export pod fully implemented? Export to clipboard seems to work fine but local filesystem doesn't. Is it just me or known issue?
  • m

    mihaiconstantin

    01/17/2022, 12:16 PM
    @User It finished indexing the 100k files (i.e., without wiki links). The second start is also slowish. But it's not just Dendron starting being slow. The while VSCode interface is sluggish at this point (i.e., even the Command Palette and the integrated terminal). @User I will try with 10k files instead of 100k and also include a random wiki link as follows:
    Copy code
    bash
    #!/bin/bash
    
    # How many notes?
    note_count=10000
    
    for i in $(seq $note_count);
    do
        # A random wiki link.
        link_to="[[note.test$(((RANDOM % $note_count) + 1))]]"
    
        # Note body.
        echo "---" > "note.test$i.md"
        echo "id: $(openssl rand -hex 11)" >> "note.test$i.md"
        echo "title: Test $i" >> "note.test$i.md"
        echo "desc: ''" >> "note.test$i.md"
        echo "updated: 1642417675995" >> "note.test$i.md"
        echo "created: 1642417180575" >> "note.test$i.md"
        echo "---" >> "note.test$i.md"
        echo "" >> "note.test$i.md"
        echo "# Note" >> "note.test$i.md"
        echo "" >> "note.test$i.md"
        echo "This note links to $link_to." >> "note.test$i.md"
    done
    Which will generate a note that looks like this:
    Copy code
    markdown
    ---
    id: 0ffcf3980aaf6bc88aefc8
    title: Test
    desc: ''
    updated: 1642417675995
    created: 1642417180575
    ---
    
    # Note
    
    This note links to [[note.test7933]].
    k
    • 2
    • 2
  • m

    mihaiconstantin

    01/17/2022, 1:00 PM
    With 10k notes and wiki links, it seems fine. No noticeable lag on the VSCode side. Also, the Lookup Bar is still snappy. These are not exact measurements, rather just me eyeballing the system time: - initial start-up after generating the files: ~19s - subsequent start-ups: ~16s Loading the full graph throws an exception, but that probably has to do with the poor approach used to generate the dummy notes. I wouldn't worry about performance since there are ways to handle many files (e.g., multi-vaults, archiving, branching etc.).
  • j

    Joshi

    01/17/2022, 1:05 PM
    Hello, I guess you are using the Export Pod V2 command, it is an experimental feature and will be updated in this week's release. You can use
    Dendron: Export Pod
    and then select
    dendron.markdown
    to export your workspace.
  • h

    hrmnjt

    01/17/2022, 1:40 PM
    Was struggling with this and came here to ask about same. Was getting error as below.
    Copy code
    info: {"ctx":"dendron.exportPodv2:run","msg":"pre-execute"}
    info: {"ctx":"dendron.exportPodv2:run","msg":"post-execute"}
    error: {"ctx":"dendron.markdownexportv2:run","error":{"stack":"DendronError: This error should never occur! Please report a bug if you have encountered this.\n\tat t.assertUnreachable (/Users/hsingh/.vscode-insiders/extensions/dendron.dendron-0.77.1/dist/extension.js:2:108353)\n\tat Pr.enrichInputs (/Users/hsingh/.vscode-insiders/extensions/dendron.dendron-0.77.1/dist/extension.js:8:3048192)\n\tat Pr.run (/Users/hsingh/.vscode-insiders/extensions/dendron.dendron-0.77.1/dist/extension.js:8:2883705)\n\tat processTicksAndRejections (internal/process/task_queues.js:93:5)","message":"This error should never occur! Please report a bug if you have encountered this.","name":"DendronError","status":"unknown","payload":"{}"}}
    j
    • 2
    • 4
1...504505506...757Latest