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

Long-term solution[Break change] on improve loadProtoJSON #1199

Open
summer-ji-eng opened this issue Mar 3, 2022 · 0 comments
Open

Long-term solution[Break change] on improve loadProtoJSON #1199

summer-ji-eng opened this issue Mar 3, 2022 · 0 comments
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@summer-ji-eng
Copy link
Contributor

To speed up the loadProtoJSON and addressed #1196, we have temperately solution use hashobject(JSON.stringify(json)).

Because hashobject is work for both nodejs and browser( see package.json).

For long-term ultimate goal is to reduce the dependency(i.e remove hashobject). To get rid of hashobject cause breaking change. Because crypto is Node.js specific module. And to use in browser, we need window.crypto.subtle. But the digest is asynchronies function return promise.

Example in
https://github.com/googleapis/google-auth-library-nodejs/blob/main/src/crypto/crypto.ts#L76-L81

Draft implementation PR in gax:
0ce1a4c

@summer-ji-eng summer-ji-eng added priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Mar 3, 2022
@yoshi-automation yoshi-automation added 🚨 This issue needs some love. and removed 🚨 This issue needs some love. labels Jun 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

2 participants