text: Title: Logging unexecuted keyword has unnecessary overhead if keywords are not found
  Body: In an initial effort to make my testing repo compatible with both SeleniumLibrary and Browser, I added some conditional logic to run specific keywords based on the library chosen at test execution. More specifically, I used a global variable ${AUTOMATION}, declared in an argument file, which determines the library used here.
  
  Basic example:
  ```
  IF   '${AUTOMATION}' == 'SeleniumLibrary'
      SeleniumLibrary.Keyword_1
      SeleniumLibrary.Keyword_2
      SeleniumLibrary.Keyword_3
  ELSE IF  '${AUTOMATION}' == 'Browser'
      Browser.Keyword_1
      Browser.Keyword_2
      Browser.Keyword_3
  END
  ```
  Initial results with a converted test showed a degrade in performance. If SeleniumLibrary is used, the Browser keywords are not ran, but RF appears to hang on the unmet 'ELSE IF' condition for several seconds in this example:
  ![rf7-0_slow_elseif](https://github.com/robotframework/robotframework/assets/65317440/52e024a9-c060-43af-8cc3-cf5836017491)
  
  After some discussion in Slack, I believe it's been confirmed that the root cause is due to the Browser library not being imported, which is potentially causing some overhead on the RF side. When Browser library is not imported, I get the slowness, but if I import Browser, that slowness is eliminated and I get a much more expected result:
  ![rf7-0_good_result](https://github.com/robotframework/robotframework/assets/65317440/c9830f14-b875-4c9e-a32e-b4dc4c2d9e3a)
  
  Reproducible in both RF 6.1.1 and RF 7.0.
  Python 3.10.12
  Ubuntu 22.04.3
  
  