Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce payload sizes #1249

Closed
ob6160 opened this issue Nov 24, 2021 · 1 comment
Closed

Reduce payload sizes #1249

ob6160 opened this issue Nov 24, 2021 · 1 comment
Assignees
Labels
nextjs Part of our NextJS migration

Comments

@ob6160
Copy link
Member

ob6160 commented Nov 24, 2021

I think we can shave off 100kb or so by using zlib to deflate the loo data bundle as a brotli compressed base64 encoded string.

Before we resort to that there are some more fundamental things we can do:

  • Map each id (example: 9844d4b07d20802345eda8d4) to a sequential number (mongoid??).
  • We could alternatively use the creation date/time timestamp to reference the toilet. That's 13 bytes instead of the current 24 bytes
  • OR! We could run a migration across our mongodb database so that all of our loos use small ids: https://github.com/ai/nanoid/#security
  • See if we can represent the location of each toilet in another way. Perhaps look into using "quadkeys" to represent the tile at a specific zoom level that the toilet resides in (https://github.com/joekarl/binary-quadkey#space-comparison)
    • Q: is this accurate enough?
@ob6160 ob6160 self-assigned this Nov 24, 2021
@ob6160 ob6160 added the nextjs Part of our NextJS migration label Nov 24, 2021
@ob6160 ob6160 closed this as completed Sep 10, 2022
@ob6160
Copy link
Member Author

ob6160 commented Sep 24, 2024

superceded by #1452

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
nextjs Part of our NextJS migration
Projects
None yet
Development

No branches or pull requests

1 participant