You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was doing a bit of performance analysis and tests show that initial schema validation by DocumentValidator can get quite expensive.
On a medium-sized scene file (this one), it adds 150 to 200ms to initial paint on a good laptop. Furthermore, it seems CPU-bound so it might be a lot worse on mobile devices (didn't test how bad it is though).
Do we really need schema validation?
It can't replace server-side validation if we want to ensure schema compliance.
If the document is non-compliant, we should try to display what we can anyways (think: backward compatibility when we add things to the schema for which lack of support might not be fatal )
Schema validation is used only there and adds ~200kb to the minified JS bundle
I'm not saying schema validation has no use, I understand its value, especially if Voyager is used on a simple webDAV backend that have no ability to perform said validation itself. But the price to pay with the current implementation seems too high. The solutions I see to improve on this are:
drop client-side schema validation entirely (or only from production code)
defer document validation to after initial load. We can always show a popup later to tell the user we expect things to break.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I was doing a bit of performance analysis and tests show that initial schema validation by DocumentValidator can get quite expensive.
On a medium-sized scene file (this one), it adds 150 to 200ms to initial paint on a good laptop. Furthermore, it seems CPU-bound so it might be a lot worse on mobile devices (didn't test how bad it is though).
Do we really need schema validation?
I'm not saying schema validation has no use, I understand its value, especially if Voyager is used on a simple webDAV backend that have no ability to perform said validation itself. But the price to pay with the current implementation seems too high. The solutions I see to improve on this are:
1. might be reasonable as it only prevents trying to load a bad document and there might not be a case where this is expected behaviour?
If that's not desirable, I can test if 3.'s benefits would justify the additional tooling.
Beta Was this translation helpful? Give feedback.
All reactions