Project

General

Profile

Bug #31228

Refactor uuid handling

Added by Tomer Brisker over 2 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
Performance
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

There are a couple of method in Foreman module for UUID handling that can be better.

Associated revisions

Revision 4705d72d (diff)
Added by Tomer Brisker over 2 years ago

Fixes #31228 - Improve UUID check performance

Doing a full match for regexp including saving match data is slow when
all we care about is whether it is a UUID or not. Instead first rule out
quick checks (not a string, wrong length) and only then check with
`.match?` instead of `=~` which just returns a boolean without saving
the match data.

History

#1 Updated by The Foreman Bot over 2 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/8119 added

#2 Updated by The Foreman Bot over 2 years ago

  • Fixed in Releases 2.3.0 added

#3 Updated by Tomer Brisker over 2 years ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF