#7051 ipapython/graph.py complexity optimization
Closed: fixed 6 years ago Opened 6 years ago by slaykovsky.

Hello!

Now in graph's BFS there's not optimal linear complexity of poping the first element of a list instead of using deque (near constant time complexity of popleft).

You can see on image performance of an old one (blue) and new one (red):
deqlist.png

Please see code here: https://github.com/freeipa/freeipa/pull/905


Metadata Update from @tkrizek:
- Issue priority set to: minor
- Issue set to the milestone: FreeIPA 4.6

6 years ago

master:

  • 6097b5ca5c9e686af25b375bd2c9a462fd8d8cbc ipapython/graph.py complexity optimization
  • c06bc2a36e9163839c6c99be9e2be1b386a8eae4 ipapython/graph.py String formatting
  • 370d9c57dff72abe7c3d39c8a74672b316b43de7 ipapython/graph.py redundant variable fix

Metadata Update from @tkrizek:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

6 years ago

Please ignore the commits above, I accidentally pushed the code into a mirror repo instead of upstream. Sorry about that.

Metadata Update from @tkrizek:
- Issue status updated to: Open (was: Closed)

6 years ago

master:

  • 52a4359 ipapython/graph.py complexity optimization
  • fe913b9 ipapython/graph.py String formatting
  • c39da52 ipapython/graph.py redundant variable fix

Metadata Update from @tkrizek:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

6 years ago

Login to comment on this ticket.

Metadata
Attachments 1
Attached 6 years ago View Comment