Use `__slots__`
See original GitHub issueCurrently we use this pattern to denote that MyThing
will have a prop_a
property.
class MyThing:
prop_a = None
It looks like if we instead use __slots__
we could see 40-50% reduction in memory footprint.
class MyThing:
__slots__ = ["prop_a"]
source:
Issue Analytics
- State:
- Created 5 years ago
- Comments:13 (13 by maintainers)
Top Results From Across the Web
Slots | Vue.js
By using slots, our <FancyButton> is more flexible and reusable. We can now use it in different places with different inner content, but...
Read more >Using Slots In Vue.js
Slots are a powerful tool for creating reusable components in Vue.js, though they aren't the simplest feature to understand.
Read more >How to Use Slots in Vue.js
Implementing the use of slots is quite easy, you just have to place the slot inside the child component which is receiving the...
Read more >Using templates and slots - Web Components | MDN
Slots are identified by their name attribute, and allow you to define placeholders in your template that can be filled with any markup...
Read more >Using Vue Named Slots to Create Multiple Template Slots
Vue slots allow you to inject content from a parent component into a child component. Here's the most basic example, whatever we put...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@cburgdorf Agreed. Right tool for the right job.
I think that the objects under the
Computation
class might be a good candidate for this. For complex EVM execution we could end up with 1000+ instances of each of these objects in memory.