Skip to content
This repository was archived by the owner on Aug 11, 2021. It is now read-only.

Perf: Don't hide 'private' fields? #152

Closed
achingbrain opened this issue Jun 26, 2019 · 2 comments
Closed

Perf: Don't hide 'private' fields? #152

achingbrain opened this issue Jun 26, 2019 · 2 comments

Comments

@achingbrain
Copy link
Member

It's expensive and the convention in js is to leave methods/properties prefixed by _ alone.

image

Consider removing this?

@achingbrain
Copy link
Member Author

Enumerable getters too. Less expensive, but do we need to do it like this?

image

@vmx
Copy link
Member

vmx commented Jun 27, 2019

The reason for having those is that you can easily have the tree() function that doens't need to do any work, but just iterate over things. The other advantage is that also in your code you can enumerate over all properties and just get the values you resolve to.

Can you tell me more about those graphics? Where are they from? How much of a bottleneck is that compared to e.g. deserializing the PB.

Is this a huge performance hit or a "we could be faster if we won't do this, but atm it doesn't really matter"?

@achingbrain achingbrain changed the title Don't hide 'private' fields? Perf: Don't hide 'private' fields? Jul 9, 2019
vmx added a commit that referenced this issue Jul 17, 2019
Instead of changing the enumerability of certain fields, just generate
the appropriate output of the `tree()` call. This is possible in dag-pb
as there are no user-defined dynamic fields that we might be able to
resolve into.

Closes #152.
vmx added a commit that referenced this issue Jul 17, 2019
Instead of changing the enumerability of certain fields, just generate
the appropriate output of the `tree()` call. This is possible in dag-pb
as there are no user-defined dynamic fields that we might be able to
resolve into.

Closes #152.
@vmx vmx closed this as completed in 37ffdd5 Jul 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants