taniarascia / takenote

📝 ‎ A web-based notes app for developers.

Home Page:https://takenote.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Performance] How does it scale as more/bigger notes are created?

amatiasq opened this issue · comments

I see the app saves all notes in a single file in the repository (so far): takenote-data/notes.json

I'm sure it works fine for the first months or so but some of you probably used it for a few years with a few thousand notes.

I wonder if notes.json becomes one or two hundred MB every sync request might struggle.

So some questions around that:

  • How big has your notes.json become?
  • Is there a system in place to automatically split it up or archive old notes?
  • As a user, should I care of not copy-paste big chunks of text into notes?

I just noticed there is a limit of 1 MB for API requests like this: https://github.com/taniarascia/takenote/blob/master/src/server/handlers/sync.ts#L88-L91

This API returns blobs up to 1 MB in size. The requested blob is too large to fetch via the API, but you can use the Git Data API to request blobs up to 100 MB in size.

Incorrect. I'm using the Git data API which can receive blobs up to 100MB.

The code is making the commit through the Git Data API (here) but when reading it's using the Repositories API as you can see in the link I sent before. Probably for performance, I guess, since the Data API requires you to get the SHA of the file first.

Not sure what you mean, then. Are you using a different codebase?