modelcreate / model-view

Model View - Share and view models in the browser
https://view.modelcreate.com
GNU Affero General Public License v3.0
21 stars 11 forks source link

1st feature request : big models performance fix #19

Open alperdincer opened 4 years ago

alperdincer commented 4 years ago

Thanks for this repo. Congrats on 1st issue :) We are also working on the similar web app with different technologies, but we can switch to this app.

As we tested our app with 35K+ features, we have tested it with this app and it is not working as performant as your demo. For big files, you can switch from GeoJSON to Vector Tiles with https://github.com/mapbox/geojson-vt library before adding to MapBoxGL map.

Your opinions are important for us, may be we can join our repos together in the future to add more features in a single app.

Thanks again for this great app.

A.

lbutler commented 4 years ago

Hi Alper,

Thanks for checking out my app.

I haven't tried it on any larger models, and I'm honestly not surprised that it would be slow.

Agreed that getting this working on larger models is a worthwhile endeavour. I avoided any optimisations in this first release, so there is plenty of low hanging fruit to fix.

From what I understand, the geojson-vt library is already under the hood in mapbox gl js, but I'll double-check. I'll also load some larger models and do some performance testing to see where the slowdowns are occurring.

Below are some of the refactoring ideas I had for the app which may also increase performance

Is your app and/or repo public? I want to check it out if possible, even if its just photos or a video.

alperdincer commented 4 years ago

Hi Luke,

Sorry for late response.

We are preparing our web app to show at a forum about water systems and we are quite busy, but after that event, I'll share you detailed information about application and discuss how we can develop together.

Best regards.

lbutler commented 4 years ago

The engine that runs this app is now a separate repo, it can be found at epanet-js.

I also rewrote how the time series data is stored and accessed, the whole project is a mess and probably needs a rewrite but the speed was drastically improved.

I'm going to try it with a larger model this week and then close off this issue if the problem is solved. If not I will try to find some more performance gains.

lbutler commented 4 years ago

I've tried the a couple of larger models, both with around 20k features and things are now working correctly.

There are still a few areas where we could make improvements, such as pushing the simulation to a web worker but for now it's working. I need to do a serious refactor of this app to utilise epanet-js better.

@alperdincer, let me know how it goes and if you see an improvement

NW_Model1 PacificCity