Skip to content

Conversation

@CocoisBuggy
Copy link
Contributor

This was requested by our stalwart mobile dev, and it does make a sort of sense - though I'm not 100% sure the metric will be totally accurate

  • it might be worthwhile making another issue for the actual TEXT weight on top of the media byte-sizes all summed together

resolves #417

This was requested by our stalwart mobile dev, and it does make a sort
of sense - though I'm not 100% sure the metric will be totally accurate
- it might be worthwhile making another issue for the actual TEXT
  weight on top of the media byte-sizes all summed together

resolves #417
@glassbead0
Copy link
Contributor

I tested this code locally, and it was quite slow to request the imageByteSum for the USA (21 seconds, with 81 MB as the result). it was much faster at the state level (<1 second with as much as 50 MB), so I think just getting all descendants at the country level is quite slow. I imagine this will mostly be used at the state level though, so probably not really a big deal.

This looks good to me!

@CocoisBuggy
Copy link
Contributor Author

Thanks for bench-marking it! yea it is brutally slow, but my hope is that users will have no reason to fetch this value unless they are doing cache lookahead, which shouldn't be every time (I hope)

It could be sped up enormously by de-normalizing the field but the complexity of that approach is very much non-zero.

The actual way to speed it up is to merge #428 which has a more performant implementation of our area structure and would eliminate the expensive regex needed in this approach

@CocoisBuggy CocoisBuggy merged commit c112f1e into develop May 15, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Areas should include image size metadata

3 participants