Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading optimization #35

Closed
andrewisen opened this issue Feb 4, 2021 · 7 comments
Closed

Loading optimization #35

andrewisen opened this issue Feb 4, 2021 · 7 comments
Assignees
Labels
enhancement New feature or request

Comments

@andrewisen
Copy link

This issue refers to how fast the scenes load. In other words, how fast can we parse an IFC file. Check out #33 for the related geometry optimization issue.

I have implemented web workers to allow for "multithreading". Here's a link to my fork. I have documented my thoughts here and here.

TL;DR:

210129_SpeedTest.mp4

The next step is to figure out how to implement my (or a similar) solution into this project. There are many ways to do this.

I suggest we/you release the first version of IFC.js and THEN implement web worker support.
Yes - performance is an important factor. But, I think it's more important to support the most useful IFC2x3 classes.

Anyways, that's just my thoughts. I'm open to suggestion and I encourage others to experiment with this as well.

@agviegas
Copy link
Collaborator

agviegas commented Feb 4, 2021

This is wonderful! 😀

Yes, I agree. I will finish the first version, and see how can we integrate this.

I am sure this is something everyone will be willing to use. Once I finish 1.0, I will read all your documentation carefully so hopefully we can have this integrated as soon as possible. Congratulations for the amazing work!

@agviegas agviegas added the enhancement New feature or request label Feb 4, 2021
@agviegas agviegas mentioned this issue Feb 4, 2021
@agviegas
Copy link
Collaborator

Hey @andrewisen, I finally found some time to take a look at your documentation. It is super nice! I would love to see this in a Pull Request to see how fast IFC.js becomes.

As I think they are two separate topics, I would start with web workers, and then (in another PR) implement IndexDB. What do you think? You can simply pull the last changes in the code, submit a draft pull request attached to this issue and I can help you with the problems that arise. 🙂

@andrewisen
Copy link
Author

Yhea, sounds great. I can do some refactoring to my code. I'm a bit busy with other stuff at the moment.
I can hopefully make a PR next weekend (not this weekend) 😄

@agviegas
Copy link
Collaborator

Great. Also, beware that if the reason not to use web workers with buildGeometry is that it doesn't support THREE.js, I can shift all THREE.js logic forward, so we can hopefully fit as much as we can inside the workers, and only in the end call THREE.js entities. Anyway, let's have a first implementation and see how it looks like!

@andrewisen
Copy link
Author

I had some extra time to look at my code 🤓

Firstly, I did some major code refactoring. I have separated the examples, which will make the PR much nicer. My examples are now placed in the 04 folder, see more here.

I will take a short break (I have other stuff to do atm) and get back to this during this weekend.
I will fix some minor stuff and then submit a PR for each topic.

@andrewisen
Copy link
Author

andrewisen commented Feb 16, 2021

I noticed that my multi-web-worker example didn't perform as well with the latest changes (e.g. b41d41b, 4536408, d92e8f8).

There is a time penalty for starting an additional Web Worker. My guess is that the parser is so much faster now that there's no performance gain to be made. This might be different for large (>200MB) IFC files.

I will experiment with this some more 😄

@agviegas
Copy link
Collaborator

agviegas commented Mar 8, 2021

I'm closing this issue for now, as the main responsible for optimization now are both web-ifc-three and web-ifc. Feel free to drop new ideas there to make this even faster!

@agviegas agviegas closed this as completed Mar 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants