This change puts the get_last_activity method behind a lazy-loaded property decorator, like many other properties in this library.
I found that some initialization-time network calls were being made by trello.Board when investigating a performance regression with a project using py-trello bumping versions between 0.9.0 and 0.11.3. The addition of get_last_activity to the constructor of trello.Board means that a call to trello.TrelloConnection.list_boards will incur N+1 network round-trips, where N is the count of boards returned by list_boards. This changes that behavior, so now list_boards only performs 1 network call.
This change puts the
get_last_activity
method behind a lazy-loaded property decorator, like many other properties in this library.I found that some initialization-time network calls were being made by
trello.Board
when investigating a performance regression with a project using py-trello bumping versions between 0.9.0 and 0.11.3. The addition ofget_last_activity
to the constructor oftrello.Board
means that a call totrello.TrelloConnection.list_boards
will incur N+1 network round-trips, where N is the count of boards returned bylist_boards
. This changes that behavior, so nowlist_boards
only performs 1 network call.All tests pass as well!