Skip to content
Snippets Groups Projects

Feature #330: Improve runtime for InterferenceLimitedInterface.update()

This MR includes

  • Fixing the settings file for scanInterval
  • Splitting up InterferenceLimitInterface.update into multiple methods to see which costs most performance
Edited by Ghost User

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • 60 60 * @param anotherInterface The host to connect to
    61 61 */
    62 62 public void connect(NetworkInterface anotherInterface) {
    63 if (this != anotherInterface
    64 && anotherInterface.getHost().isRadioActive()
    65 && isScanning()
    66 && isWithinRange(anotherInterface)
    67 && !isConnected(anotherInterface)) {
    63 if (this != anotherInterface
    64 && !isConnected(anotherInterface)
    65 && anotherInterface.isActive()
    • Author Contributor

      Why did you change this from !isConnected to isActive()? Please open another MR for this if this is a separate logic change. (Pretty much hidden in refactoring right now).

    • Author Contributor

      It's not we check still check isConnected(anotherInterface).

      I changed anotherInterface.getHost.isRadioActive to anotherInterface.isActive, i.e., we only connect to an interface if it's active, not if any interface of the host is active. This doesn't change behaviour for us at all, but I don't see how the previous behaviour made sense.

      I moved isScanning out of this method, so I do not check it for every potential connection, just once for all. But the check is still done at the same time, we do not make more or less connections.

    • Author Contributor

      You're right on account of isScanning. I agree with the isActive reasoning, but it is still a separate logical change I would like to see a separate MR on.

    • Author Contributor

      Okay, moved to !91 (merged)

    • Please register or sign in to reply
  • Ghost User added 5 commits

    added 5 commits

    • 178b0374 - Do not use iterator for removing sending connections
    • 082f237a - Use equals instead of == for comparison
    • 083de938 - Change removeConnection access to private and fix indentation in it
    • ed68eb71 - Fix indentation
    • 7c457511 - Merge branch 'feature-#328-iterators-instead-of-list-copies' into feature-#330-improve-update

    Compare with previous version

  • added Needs Changes and removed Needs Review labels

  • Ghost User added 61 commits

    added 61 commits

    Compare with previous version

  • Ghost User changed the description

    changed the description

  • Ghost User mentioned in merge request !91 (merged)

    mentioned in merge request !91 (merged)

  • added Needs Review and removed Needs Changes labels

  • merged

  • Ghost User mentioned in commit 1b8abd6e

    mentioned in commit 1b8abd6e

  • Please register or sign in to reply
    Loading