Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cache MiqExpression.get_col_type in MiqReport::Formatting
This call will make the same call to the DB over and over again on certain attributes, and is incredibly "N+1y" on large reports. This adds a simple cache for the data return from the DB calls to make sure they are only executed once per column. Moved into a separate method to break up the bulk of the current method. Note: An extra `to_sym` was removed when in the new method since it would always get executed on the next line if the value existed. Probably could remove the `unless` as well since at that point, we should be clear... 🤷
- Loading branch information