Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Renamed src/main/groovy to src/main/java in core

    • -727
    • +0
    ./BTreePersistentIndexedCache.java
  1. … 2535 more files in changeset.
Replace usage of `String#format` with good old string concatenation

The rationale behind this change is that while `String#format` is usually admitted as good for readability (this is arguable),

in practice it is very bad for performance. Since Java 6, the JVM (the JIT, to be correct) does a pretty good job at optimizing

string concatenation. However, it is only capable to do so if we're using "dirty" string concatenations (using `+`), or `StringBuilder`.

However, usage of `StringBuilder` is not recommended either for 2 reasons:

1. it significantly decreases code readability

2. in Java 9, String concatenation is even more optimized thanks to `invokedynamic`, and code using `StringBuilder` will *not* benefit

from this optimization.

There are sill leftover `String#format` calls in the code, in the following cases:

- the call is used to generate an exception message. That's 90% of the remaining calls.

- the call is obviously a debug message, often used in `toString` (because as we all know, `toString` should only be used for debugging)

- the format includes specific number formatting patterns

- I missed it

  1. … 224 more files in changeset.
Add some more diagnostics for cache corrupted failures

  1. … 1 more file in changeset.
Removed a TODO.

replace CRC32 checksum with a count of written bytes - bumping metadata cache layout version to 2.16

+review REVIEW-5622

  1. … 3 more files in changeset.
get rid of unnecessary RandomAccessFile.length() calls

+review REVIEW-5622

Renamed package o.g.messaging.serialize to o.g.internal.serialize.

  1. … 171 more files in changeset.
Use Kryo rather than DataInput backed encoders for serializing cache keys and entries.

Use string name instead of file path when creating an indexed cache.

  1. … 15 more files in changeset.
Moved some io stream implementations from core to baseServices.

  1. … 7 more files in changeset.
Extracted RandomAccessFileOutputStream class.

  1. … 1 more file in changeset.
Extracted RandomAccessFileInputStream class so that it can be used elsewhere.

  1. … 1 more file in changeset.
Changed Serializer to use Encoder and Decoder types instead of OutputStream and InputStream.

  1. … 21 more files in changeset.
Moved Serializer from core to messaging.

  1. … 17 more files in changeset.
Rename FileAccess methods to be more accurate.

  1. … 15 more files in changeset.
- Moved the lazy open stuff to DefaultTaskArtifactStateCacheAccess, and all caches provided via CacheRepository are opened immediately. - Some tweaks to the cache display names.

  1. … 12 more files in changeset.
Introduced TaskArtifactStateCacheAccess to isolate the various pieces of change detection from how the caches are constructed, and to provide synchronized access to the caches.

  1. … 16 more files in changeset.
Use the same synchronization scheme for all indexed caches, not just the dependency cache ones.

  1. … 5 more files in changeset.
- Extracted FileAccess out of FileLock, to separate accessing the file from managing the lock for the file. - Removed some unused stuff.

  1. … 14 more files in changeset.
Handle key hash collisions part 1 - use md5 of the serialised key instead of key.toString().hashcode() as the hash.

    • -13
    • +56
    ./BTreePersistentIndexedCache.java
  1. … 5 more files in changeset.
GRADLE-1166 - Changed index cache implementation so that it is invalidated on crash during write.

    • -0
    • +94
    ./LockingBlockStore.java
  1. … 2 more files in changeset.
Shuffled some packages around.

    • -0
    • +680
    ./BTreePersistentIndexedCache.java
    • -0
    • +100
    ./CachingBlockStore.java
    • -0
    • +22
    ./CorruptedCacheException.java
    • -0
    • +352
    ./FileBackedBlockStore.java
    • -0
    • +271
    ./FreeListBlockStore.java
    • -0
    • +78
    ./StateCheckBlockStore.java
  1. … 38 more files in changeset.