HashLips / hashlips_art_engine

HashLips Art Engine is a tool used to create multiple different instances of artworks based on provided layers.
MIT License
7.18k stars 4.3k forks source link

Generation is slow #881

Open sleiman88 opened 2 years ago

sleiman88 commented 2 years ago

how to remove the delay while generative different images .need to make generation faster and remove delay between dna creation

bolshoytoster commented 2 years ago

@sleiman88 I've managed to over quadruple the speed by making the rendering happen in a seperate thread. I'm going to push this to my fork once I've gotten rid of any other things that might be slowing it down.

Edit: practically, I've only sped it up by 30%. If javascript wasn't stupid and just let me make a duplicate of a class without over 45 lines of code I could speed it up by ~99%.

But, I've also finally managed to reduce memory usage by opening the files once instead of each time they're needed.

So overall, 30% increase in speed (each generation went from ~100ms to ~70ms) and ~30% improvement in memory usage (60 MiB to 37.5 MIB for a 324 artwork build).

ghost commented 2 years ago

@bolshoytoster Hi there, thank you for making your adjustments and publishing it.

I was wondering if you could help me out what this error means: Assertion failed: !process->exit_cb_pending, file c:\ws\deps\uv\src\win\process.c, line 857

When i run your code and ask the edition to grow to 35 i get this error. I've been trying for the past couple of days but it seems i can not get this faster nft generation process to work.

bolshoytoster commented 2 years ago

@kiven243 You might have to use a different version of node.

HashLips commented 2 years ago

@bolshoytoster Hi, I just wanted to say thank you. I see you all the time helping people out. If you would like to reach out please feel free to do so. I would like to sit with you and implement an update from all your learnings working with the community.

here is my email: hashlipsnft@gmail.com