I randomly noticed that EntityMetadataRow has an <i18n> custom block. We previously found that <i18n> custom blocks resulted in noticeably reduced performance for the submissions table: because the table uses infinite scroll, it can render many row components, each of which has to do a small amount of work to initialize its i18n. Surprisingly, that work did end up adding up, so we removed <i18n> custom blocks from the row components. The entities table can similarly render many row components, so I think we should remove the <i18n> custom block from EntityMetadataRow. I've moved the one message in EntityMetadataRow to en.json5.
Why is this the best possible solution? Were any other approaches considered?
At some point, we're planning to replace these tables' infinite scroll with pagination, after which this may no longer be a concern. It's also conceivable that Vue I18n has addressed this performance issue since the last time I checked. However, I think there's little downside to moving this one message to en.json5. If it can help prevent performance issues before the time that we introduce pagination, I think that'll be worth it. We can always move the message back if/when we're confident it's OK to do so.
What has been done to verify that this works as intended?
I verified locally that the row still shows the correct tooltip for the button.
Before submitting this PR, please make sure you have:
[x] run npm run test and npm run lint and confirmed all checks still pass OR confirm CircleCI build passes
[x] verified that any code or assets from external sources are properly credited in comments or that everything is internally sourced
I randomly noticed that
EntityMetadataRow
has an<i18n>
custom block. We previously found that<i18n>
custom blocks resulted in noticeably reduced performance for the submissions table: because the table uses infinite scroll, it can render many row components, each of which has to do a small amount of work to initialize its i18n. Surprisingly, that work did end up adding up, so we removed<i18n>
custom blocks from the row components. The entities table can similarly render many row components, so I think we should remove the<i18n>
custom block fromEntityMetadataRow
. I've moved the one message inEntityMetadataRow
to en.json5.Why is this the best possible solution? Were any other approaches considered?
At some point, we're planning to replace these tables' infinite scroll with pagination, after which this may no longer be a concern. It's also conceivable that Vue I18n has addressed this performance issue since the last time I checked. However, I think there's little downside to moving this one message to en.json5. If it can help prevent performance issues before the time that we introduce pagination, I think that'll be worth it. We can always move the message back if/when we're confident it's OK to do so.
What has been done to verify that this works as intended?
I verified locally that the row still shows the correct tooltip for the button.
Before submitting this PR, please make sure you have:
npm run test
andnpm run lint
and confirmed all checks still pass OR confirm CircleCI build passes