Skip to content

Conversation

@sunag
Copy link
Collaborator

@sunag sunag commented Jun 4, 2019

This should be a reduction in memory usage since the whole code is stored in a string as a hash.

Still, a benchmark is required to check the memory usage reduction and additional processing used to generate the checksum.

It is a WIP - not ready for merger

@Mugen87
Copy link
Collaborator

Mugen87 commented Jun 4, 2019

It is a WIP - not ready for merger

If so, consider to make Draft PRs in the future (e.g. #16678)

@sunag sunag changed the title getProgramCode to getProgramChecksum DRAFT: getProgramCode to getProgramChecksum Jun 4, 2019
material, lights.state, shadowsArray, fog, _clipping.numPlanes, _clipping.numIntersection, object );

var code = programCache.getProgramCode( material, parameters );
var checksum = programCache.getProgramChecksum( material, parameters );
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The crc is used as a hash, so maybe use this terminology, instead?

var hash = programCache.getProgramHashCode( material, parameters );

@Mugen87
Copy link
Collaborator

Mugen87 commented Oct 7, 2019

@sunag The idea is great but we need a performance test to verify the consequences on memory consumption and processing speed. The performance of initMaterial() does matter and should ideally not be worse than before.

Closing for now. Please make a new (non-WIP) PR if you can confirm no performance degradation in initMaterial().

@Mugen87 Mugen87 closed this Oct 7, 2019
@Mugen87 Mugen87 changed the title DRAFT: getProgramCode to getProgramChecksum DRAFT: getProgramCode to getProgramHashCode Oct 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants