Closed Bug 936894 Opened 11 years ago Closed 11 years ago

Optimize webgl backend code a bit

Categories

(DevTools Graveyard :: WebGL Shader Editor, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 937627

People

(Reporter: vporof, Assigned: vporof)

Details

Attachments

(1 file)

Complex stuff like the UE demo gets a bit slowed down because all the function wrapping. There's a bunch of micro-optimizations that can be done to speed up things.
UE benchmarked with the shader editor closed: 60fps
With the shader editor open: ~40fps.
With this patch: 50fps

* Array.slice was slow, spread args seem to be better
* the *.call invocations are slow, removed the unnecessary ones
* added some traps here and there to avoid costly array operations
* switched from maps to arrays where possible and keys were always numbers
* bunch of other things

All of these things don't make *that* much of a difference, but a ~10fps improvement is justified and the code is not harder to maintain now.
Assignee: nobody → vporof
Status: NEW → ASSIGNED
Attachment #829864 - Flags: review?(dcamp)
Changes here will be incorporated in bug 937627.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
Attachment #829864 - Flags: review?(dcamp)
Product: Firefox → DevTools
Product: DevTools → DevTools Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: