Project

General

Profile

Actions

Feature #21505

open

Define __slots__ for all classes in the fusedir and fusefile modules

Added by Brett Smith 9 months ago. Updated 7 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

Also available in: Atom PDF