Comment update system #4
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Rather than always getting the comment data from the server and then rendering it. Load the comments once and save that (possibly base64 encoded) in the browser's localstorage. Then once the page is loaded again use the localstorage first to quickly load all the comments while you're also loading new comments from the API.
If the new loaded comments are different from the old ones, update the field. Otherwise you can leave it alone.
Possibly even better, instead of loading all the comments and checking if there is an update, the API might expose a hash. This hash is the hash of the entire comment DB. If this hash is different, then load all the comments.
This saves more on database queries.
Commit in api has made this possible.
Done!