koumoul-dev / vuetify-jsonschema-form

Create beautiful and low-effort forms that output valid data. Published on npm as @koumoul/vjsf.
https://koumoul-dev.github.io/vuetify-jsonschema-form/latest/
MIT License
538 stars 154 forks source link

Performance issues #257

Closed mvandenburgh closed 2 years ago

mvandenburgh commented 3 years ago

Hi,

We're using VJSF for https://github.com/dandi/dandiarchive and we're running into performance issues with certain large datasets. The JSON schema being used is here, and an example of a dataset that is causing slowdowns is here.

The Vue web app is using VJSF to generate forms for various fields in the schema. In the case of the example I provided, the VJSF form being generated for the contributor field takes 10-15 seconds to load in all the data. It also seems to block the thread for the entirety of the loading time, so the browser essentially freezes for those 10-15 seconds.

You can observe the slowdown caused by that dataset on our production deployment here when you click the "View Metadata" button. I can describe how to run DANDI and import the dataset locally if someone wants to take a closer look at this issue.

albanm commented 3 years ago

Did you switch to the recent v2 release ? It contains improvements on performance and reactivity.

mvandenburgh commented 3 years ago

Did you switch to the recent v2 release ? It contains improvements on performance and reactivity.

Our current master branch is running version 1.21.0, but I just tested version 2.0.2 locally and the same issue occurs.

satra commented 3 years ago

@mvandenburgh - also see related issue #245

albanm commented 3 years ago

Can you please provide a codepen (easily created by clicking on the codepen link of a vjsf doc example) with as little boilerplate as possible and displaying problematic performance ?

satra commented 3 years ago

2.0 solves this issue, here are two examples:

using 1.24: https://codepen.io/satra-the-reactor/pen/zYZLNPE?editors=1010 (slow) using 2.0.2: https://codepen.io/satra-the-reactor/pen/NWbKbrj?editors=1010 (fast)

albanm commented 3 years ago

I hoped so. I know it improved a lot my own worst use cases.

mvandenburgh commented 3 years ago

We've encountered some more performance bugs with different datasets using this JSON schema - VJSF 2.0.3 takes about 18 seconds to render the slow example below. I've also included an example of a fast-loading dataset in case that helps to identify where the slowness is coming from.

https://codepen.io/aichoudh/pen/OJmVpYY (fast) https://codepen.io/aichoudh/pen/ExmjWqw?editors=1010 (slow) https://codepen.io/satra-the-reactor/pen/NWbKbrj?editors=1010 (another slow one)

waxlamp commented 3 years ago

We've encountered some more performance bugs with different datasets using this JSON schema - VJSF 2.0.3 takes about 18 seconds to render the slow example below. I've also included an example of a fast-loading dataset in case that helps to identify where the slowness is coming from.

https://codepen.io/aichoudh/pen/OJmVpYY (fast) https://codepen.io/aichoudh/pen/ExmjWqw?editors=1010 (slow) https://codepen.io/satra-the-reactor/pen/NWbKbrj?editors=1010 (another slow one)

We love using VJSF in our project, so we're anxious to help you identify any performance bottlenecks. Please let us know what we can do to help!

waxlamp commented 2 years ago

@albanm, could you help us gain some insight into what may be slowing things down, and what we can do to fix our problem and/or contribute a fix to VJSF?

mvandenburgh commented 2 years ago

Closing this as it has been resolved by #284.