Bug 1375327

Summary: In MiqExpression, leverage virtual columns w/ arel
Product: Red Hat CloudForms Management Engine Reporter: Satoe Imaishi <simaishi>
Component: PerformanceAssignee: Keenan Brock <kbrock>
Status: CLOSED WONTFIX QA Contact: Dave Johnson <dajohnso>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 5.7.0CC: cpelland, jhardy, obarenbo
Target Milestone: GAKeywords: ZStream
Target Release: 5.6.3   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1375319 Environment:
Last Closed: 2016-10-10 14:00:09 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1375319    
Bug Blocks:    

Comment 2 Keenan Brock 2016-09-12 17:48:46 UTC
More details on the description:

On the VMs screen, if you use a virtual column in a miq expression, the screen goes from ~10 to ~2 minutes.

This is similar to sorting by a virtual column which used to cause the same jump.

technical: This is because it is forced to load all the vms into the server while sorting through the results.

This is not dependent upon how many vms come back to the ui.

Comment 3 CFME Bot 2016-09-12 17:55:43 UTC
New commit detected on ManageIQ/manageiq/darga:
https://github.com/ManageIQ/manageiq/commit/492d57a3fd6d9328cadf4b86b66832f4e2186c8c

commit 492d57a3fd6d9328cadf4b86b66832f4e2186c8c
Author:     Gregg Tanzillo <gtanzill>
AuthorDate: Fri Jun 3 14:06:34 2016 -0400
Commit:     Oleg Barenboim <chessbyte>
CommitDate: Mon Sep 12 13:53:29 2016 -0400

    Merge pull request #8870 from kbrock/miq_expression_virtual_columns_with_arel
    
    In MiqExpression, leverage virtual columns w/ arel
    (cherry picked from commit f4b27ed2ec355afc4d3570abe7a260af0a0e3992)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1375327

 app/models/miq_expression.rb       | 17 ++++++++-----
 spec/models/miq_expression_spec.rb | 50 ++++++++++++++++++++++++++++++++------
 spec/models/rbac_spec.rb           |  2 +-
 3 files changed, 54 insertions(+), 15 deletions(-)

Comment 4 Satoe Imaishi 2016-09-13 14:48:57 UTC
Reverted by https://github.com/ManageIQ/manageiq/pull/11205

Comment 6 Keenan Brock 2016-10-10 14:00:09 UTC
This is too risky for 5.6. It is in 5.7