Project

General

Profile

Actions

Feature #21505

open

Define __slots__ for all classes in the fusedir and fusefile modules

Added by Brett Smith 8 months ago. Updated 6 months ago.

Status:
New
Priority:
Normal
Assigned To:
-
Category:
FUSE
Target version:
Story points:
0.5

Description

Because these are the classes that arv-mount might instantiate several thousand of, defining __slots__ could make for a noticeable improvement in memory use at little cost.

Note that __slots__ needs to be defined on all classes to get the full benefit. Subclasses that add no attributes to their parents need to say __slots__ = ().

#21541 added slots to the most commonly instantiated classes in arvados_fuse.fusedir. The following still need to have __slots__ defined:

  • TmpCollectionDirectory
  • UnsaveableCollection
  • MagicDirectory
  • TagsDirectory
  • TagDirectory
  • SharedDirectory

In addition, a number of classes in arvados.collection would benefit from defining __slots__

  • CollectionBase
  • RichCollectionBase
  • Collection
  • Subcollection
  • CollectionReader
Actions #1

Updated by Peter Amstutz 7 months ago

  • Tracker changed from Idea to Feature
Actions #2

Updated by Peter Amstutz 7 months ago

  • Target version changed from To be scheduled to Future
Actions #3

Updated by Peter Amstutz 6 months ago

  • Description updated (diff)
Actions

Also available in: Atom PDF