-
Notifications
You must be signed in to change notification settings - Fork 86
fix(load-modules): unnecessary calls to updateModuleRegistry #939
Conversation
Size Change: 0 B Total Size: 687 kB ℹ️ View Unchanged
|
|
||
const moduleMapHash = hash(moduleMap); | ||
if (cashedModuleMapHash && cashedModuleMapHash === moduleMapHash) { | ||
return {}; |
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.
Is there value in logging here, maybe in the non-cache-hit case? so those who watch logs can see '3 modules change since last poll' and have confirmation that the change has actually been processed?
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.
We already log that
one-app/src/server/utils/pollModuleMap.js
Line 151 in 531958f
`pollModuleMap: ${numberOfModulesLoaded} modules loaded/updated:`, |
2b60c63
to
17a3b4d
Compare
|
||
const moduleMapHash = hash(moduleMap); | ||
if (cashedModuleMapHash && cashedModuleMapHash === moduleMapHash) { | ||
return {}; |
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.
We already log that
one-app/src/server/utils/pollModuleMap.js
Line 151 in 531958f
`pollModuleMap: ${numberOfModulesLoaded} modules loaded/updated:`, |
* fix(load-modules): unnecessary calls to updateModuleRegistry * test(integration): update to ensure module map reset)
Description
currently any module which does not get loaded correctly is re-required on every module map poll.
This change limits fetching and parsing modules to one round per change in the module map.
Motivation and Context
limit unnecessary calls to require-from-string which consumes memory.
How Has This Been Tested?
Types of Changes
Checklist:
What is the Impact to Developers Using One App?
None