-
Notifications
You must be signed in to change notification settings - Fork 1.7k
infra: suffix index.js and worker url with md5 #4531
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
Conversation
tensorboard/defs/defs.bzl
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool. I’m okay with a new binary and macro for this. The more we have,
the more I consider defining something like a custom Jinja context with
filters for inlining base64 images, computing file digests, transcluding
files, etc. That way we could have fewer ad hoc genrules everywhere.
wchargin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lovely; thanks!
|
Moved the macro to Please TAL. |
TensorBoard resources, especially JavaScripts, are not tiny yet they are not being cached at all by clients. As such, users are downloading large amount of content every time browser refreshes and it impacts: - above the fold time load latency - server utilization This change mitigates above two problems by giving us an ability to leverage caching by creating a unique resource url with md5 hash of the file. Do note that browsers treat, for example, `index.js` differently than `index.js?random_query`.
…nternal transformations
wchargin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don’t entirely understand the internal/external structure—why not move
the contents of defs/internal/resource.bzl to defs/js.bzl?—but no
major objection.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/md5/hash/
|
Any folder with word |
Interesting; I didn’t know this. I don’t entirely understand, since we I also don’t quite get why it’s valuable to declare this macro in an Agreed that it would be nice to avoid random Google packages taking a |
Technically, it is not a violation at Bazel level but buildozer would scream foul. If you disregard those lint warnings, I guess it has no powers. In other words, it is not Barlog proof. |
|
I see. In any case, like I said, no major objection; please don’t feel |
9e659c3 to
f40dc98
Compare
TensorBoard resources, especially JavaScripts, are not tiny yet they are
not being cached at all by clients. As such, users are downloading large
amount of content every time browser refreshes and it impacts:
This change mitigates above two problems by giving us an ability to
leverage caching by creating a unique resource url with md5 hash of the
file.
Do note that browsers treat, for example,
index.jsdifferently thanindex.js?random_query.Internal change: cl/351171360
Test CL: cl/351209032