glQiwiApi icon indicating copy to clipboard operation
glQiwiApi copied to clipboard

Optimize classes by adding `__slots__`

Open GLEF1X opened this issue 2 years ago • 1 comments

Benchmarks show that adding __slots__ to the classes reduce memory usage by 4-6%.

Without __slots__:

old

With it:

new

GLEF1X avatar Nov 30 '22 19:11 GLEF1X

This pull request fixes 17 alerts when merging e6d24ebecb57d08addbd94009398f20d1df3ab9f into fcb9a93d12a15b37a95e485f861a72025b571180 - view on LGTM.com

fixed alerts:

  • 16 for Unused import
  • 1 for Module is imported with 'import' and 'import from'

Heads-up: LGTM.com's PR analysis will be disabled on the 5th of December, and LGTM.com will be shut down ⏻ completely on the 16th of December 2022. It looks like GitHub code scanning with CodeQL is already set up for this repo, so no further action is needed :rocket:. For more information, please check out our post on the GitHub blog.

lgtm-com[bot] avatar Nov 30 '22 19:11 lgtm-com[bot]