chinedufn / psd

A Rust API for parsing and working with PSD files.
https://chinedufn.github.io/psd
Apache License 2.0
265 stars 40 forks source link

[feature] Rewrite renderer to iterative algorithm #35

Closed scoiatael closed 2 years ago

scoiatael commented 2 years ago

Yo,

during some testing discovered that recursive algorithm sometimes breaks in the demo - this should fix it :)

I should have one more PR soon which adds support for newer PS slice format (version 7 and 8).

scoiatael commented 2 years ago

The exact issue is that browser goes OOM and kills the process - on my rig it takes a little over 3Gb - which happens even on small (< 100Mb) designs.

scoiatael commented 2 years ago

Identified another 20% performance improvement - hash map usage :) Before: https://share.firefox.dev/3amFLL2 After: https://share.firefox.dev/3amFTu0

chinedufn commented 2 years ago

Heads up -> I'm a bit swamped at the moment. I will review this and the other PR either today or this weekend. Thanks for diving into this!

scoiatael commented 2 years ago

Sure, sorry for notification spam, found one 20% speedup; now: https://share.firefox.dev/3amCL1n :)

scoiatael commented 2 years ago

@codewitchbella wanna take a look?

chinedufn commented 2 years ago

Thanks so much for this performance improvement!

Released as 0.3.2