Skip to content

Chunk size of 256 keys might be too large #136

Open
@ivanik7

Description

@ivanik7

I noticed that in the Find My app on a macOS VM, the tracker updates its location more frequently, then it does in Home Assistant. After experimenting with the code, I found the following:

In findmy/reports/reports.py::fetch_reports the large array of keys is spit into chunks of 256 entries. However, this doesn't work for me. If the chunk size greater than 64 elements, apple returns only some part of data, and the last location reports are missing.

How did you determine that 256 is a right size of chunks? Maybe there is a account limit?

Image

Image

Maybe a good idea would be to implement a function that searches only for the last known location. It could iterate over the rolling keys in reverse, from end to start, and stop as soon as the first batch returns results

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions