1dba1622049dd957dfce138618e4ee4180222b4a,distributed/protocol/utils.py,,unpack_frames,#Any#,116

Before Change


    frames = []
    start = 8 + n_frames * 8
    for i in range(n_frames):
        (length,) = struct.unpack("Q", b[(i + 1) * 8 : (i + 2) * 8])
        frame = b[start : start + length]
        frames.append(frame)
        start += length

After Change


    pack_frames
    
    fmt = "Q"
    fmt_size = struct.calcsize(fmt)
    (n_frames,) = struct.unpack_from(fmt, b)
    lengths = struct.unpack_from(f"{n_frames}{fmt}", b, fmt_size)

    frames = []
    start = fmt_size * (1 + n_frames)
    for length in lengths:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: dask/distributed
Commit Name: 1dba1622049dd957dfce138618e4ee4180222b4a
Time: 2020-07-21
Author: jakirkham@gmail.com
File Name: distributed/protocol/utils.py
Class Name:
Method Name: unpack_frames


Project Name: dask/distributed
Commit Name: 383ea0326ae103b5d5e0b62ed9c3cb18510c5b9e
Time: 2021-02-17
Author: jakirkham@gmail.com
File Name: distributed/comm/tcp.py
Class Name: TCP
Method Name: read


Project Name: ekzhu/datasketch
Commit Name: cd91a294f32206728436890be3e697b6c1325841
Time: 2015-04-08
Author: erkangzhu@gmail.com
File Name: datasketch/minhash.py
Class Name: MinHash
Method Name: __setstate__