Object/Class

scala.meta.internal.metals

CompressedPackageIndex

Related Docs: class CompressedPackageIndex | package metals

Permalink

object CompressedPackageIndex extends Serializable

Linear Supertypes
Serializable, java.io.Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CompressedPackageIndex
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. val DefaultBucketSize: Int

    Permalink

    The default size of bloom filters that are used for fuzzy symbol search.

    The default size of bloom filters that are used for fuzzy symbol search.

    The default value was chosen based on two criteria: cpu usage and memory usage. Here are the performance results of a searching for the query "File" with different bucket sizes.

    Benchmark               (bucketSize)  (query)  Mode  Cnt    Score   Error  Units
    ClasspathFuzzBench.run           128     File    ss   50   77.908 ± 6.572  ms/op
    ClasspathFuzzBench.run           256     File    ss   50   75.587 ± 3.173  ms/op
    ClasspathFuzzBench.run           512     File    ss   50   74.154 ± 3.751  ms/op
    ClasspathFuzzBench.run          1024     File    ss   50   81.825 ± 4.910  ms/op
    ClasspathFuzzBench.run          2048     File    ss   50   92.891 ± 5.241  ms/op
    ClasspathFuzzBench.run          4096     File    ss   50  101.436 ± 3.746  ms/op
    ClasspathFuzzBench.run          8192     File    ss   50  106.969 ± 3.971  ms/op

    There query performance goes down with larger bucket sizes presumably because for every hit we need to walk a lot of redudant classfile names.

    Here is the memory usage of differently sized bloom filters.

    | Size | Total memory | Ratio | | --- | -------------- | ----------------- | | 512 | 776 bytes | 1.52 byte/element | | 1024 | 1.21 kilobytes | 1.18 byte/element | | 2048 | 2.13 kilobytes | 1.04 byte/element |

    For a classpath of 235Mb, the size of the index is 3.4Mb with bucketSize=512 and 1.8Mb with bucketSize=1024.

    Given these observations, both 512 and 1024 seem like reasonable defaults so we'll go with 512 since it seems to squeeze out a tiny bit more performance at the cost of a small additional memory usage.

  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. def fromPackages(packages: PackageIndex, isExcludedPackage: (String) ⇒ Boolean, bucketSize: Int = DefaultBucketSize): Array[CompressedPackageIndex]

    Permalink

    Return an index the classpath elements for fast fuzzy symbol search.

    Return an index the classpath elements for fast fuzzy symbol search.

    packages

    the map from all packages to their member classfile paths.

    bucketSize

    the maximum number of classpath elements in each returned compressed package index.

  11. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  12. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  15. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  16. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  18. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  19. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from java.io.Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped