Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d2cf4fa3541de9571c70aee9c67fedbb6a90b0e2
      
https://github.com/WebKit/WebKit/commit/d2cf4fa3541de9571c70aee9c67fedbb6a90b0e2
  Author: Sam Sneddon <[email protected]>
  Date:   2026-07-06 (Mon, 06 Jul 2026)

  Changed paths:
    M Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py
    M 
Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py

  Log Message:
  -----------
  Remove `TestShard` `pack`/`unpack` path-prefix compression
https://bugs.webkit.org/show_bug.cgi?id=318242
rdar://181048883

Reviewed by Elliott Williams.

`TestShard.pack` reconstructed each `TestInput` while substituting the
shard name prefix into every string field via shorten/expand. The
dump+load round-trip for the full layout-tests suite takes ~2.1s
locally with pack and ~0.46s without (pickling within a single
process). This dwarfs the cost of a few MB of IPC it saves.

Additionally, the `TestShard` `__getstate__`/`__setstate__` requires
updates for every new field added to the underlying model classes, but
we cannot declare `__getstate__`/`__setstate__` on `TestInput` and
`Test` because it requires the context of the `TestShard`'s name, thus
making it easy to forget, and easy to lose data as a result of this.

With that downside, and with the lack of a performance upside, we
simply drop this "optimisation" generally.

* Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:
(TestShard.shorten): Deleted.
(TestShard.expand): Deleted.
(TestShard.pack): Deleted.
(TestShard.__getstate__): Deleted.
(TestShard.__setstate__): Deleted.
* 
Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py:
(ShardTests): Deleted.
(ShardTests.test_pickle): Deleted.

Canonical link: https://commits.webkit.org/316570@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to