SidneyNemzer / snippets

A Chrome extension that allows you to create and edit JavaScript code snippets, which are synced to all your computers
https://chrome.google.com/webstore/detail/snippets/fakjeijchchmicjllnabpdkclfkpbiag
63 stars 9 forks source link

Switch to a different storage method #5

Closed SidneyNemzer closed 6 years ago

SidneyNemzer commented 7 years ago

Edit: updated with new information

Currently, snippets are saved to Chrome's chrome.storage.sync to sync data between computers. This works, but it has some limitations.

Chrome Sync Storage Limitations

This is very low, and I didn't realize this was the case until recently.

(There are also restrictions to read/write frequency, although the autosave timer should be high enough to get around that).

Alternatives

GitHub Gist

Snippets could be stored in a private Gist on the user's GitHub.

Limitations:

Google Drive

Snippets could be stored in a file on the user's Drive

Limitations:

Firebase

I could create a Firebase application for storing Snippets

Limitations:

SidneyNemzer commented 7 years ago

I'm leaning toward the GitHub method right now, due to ease of setup on my end. Plus, it would allow users to quickly view their snippets without the extension

SidneyNemzer commented 7 years ago

For the time being, I'll stick with Chrome's Storage API. If people start to hit the limits of it, I'll come back to this.

SidneyNemzer commented 7 years ago

Update: I hit the limit myself. The snippets are stored as a child of the snippets key in sync storage, so ALL the snippets count toward the 8000 byte limit. The settings also have an 8000 byte limit, but I don't plan on ever having close to that many settings.

I'll be switching to Github Gists ASAP. I'll might keep the settings in the sync storage since there's no need to worry about the size limit there.

seanvfs commented 6 years ago

Is there an updated ETA on the switch to Github?

SidneyNemzer commented 6 years ago

I've made progress on the development branch, although I've been really busy lately. Sorry for the delay!

I hope to finish the Github update by April 30. Possibly sooner.

SidneyNemzer commented 6 years ago

Well, April 30th has come and gone. I've made a lot of progress, but the update isn't ready yet. I'll release it ASAP. New estimate is within 10 days. I hope the storage limit isn't a big issue for anyone right now!

SidneyNemzer commented 6 years ago

The new update is live!