Re: [Freeipa-devel] [PATCH] webui: use no_members option in entity select search

2015-04-14 Thread Petr Vobornik

On 04/01/2015 03:01 PM, Martin Babinsky wrote:

On 03/31/2015 04:16 PM, Petr Vobornik wrote:

Obtaining member information for entity selects is not needed and it
causes unwanted performance hit, especially with larger groups.

This patch removes it.

https://fedorahosted.org/freeipa/ticket/4948




Works as expected and the speedup is substantial (ca 10x faster lookup
of default group in user group rules for 16 groups with 100 members each).

ACK.



Pushed to master: efcd48ad01a39a67f131a2cea9d5477164fb
--
Petr Vobornik

--
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code


Re: [Freeipa-devel] [PATCH] webui: use no_members option in entity select search

2015-04-01 Thread Martin Babinsky

On 03/31/2015 04:16 PM, Petr Vobornik wrote:

Obtaining member information for entity selects is not needed and it
causes unwanted performance hit, especially with larger groups.

This patch removes it.

https://fedorahosted.org/freeipa/ticket/4948




Works as expected and the speedup is substantial (ca 10x faster lookup 
of default group in user group rules for 16 groups with 100 members each).


ACK.

--
Martin^3 Babinsky

--
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code


[Freeipa-devel] [PATCH] webui: use no_members option in entity select search

2015-03-31 Thread Petr Vobornik

Obtaining member information for entity selects is not needed and it
causes unwanted performance hit, especially with larger groups.

This patch removes it.

https://fedorahosted.org/freeipa/ticket/4948
--
Petr Vobornik
From f4cc39c016749fd73f0cc8bc67aa170ee248507a Mon Sep 17 00:00:00 2001
From: Petr Vobornik pvobo...@redhat.com
Date: Tue, 31 Mar 2015 15:54:37 +0200
Subject: [PATCH] webui: use no_members option in entity select search

Obtaining member information for entity selects is not needed and it
causes unwanted performance hit, especially with larger groups.

This patch removes it.

https://fedorahosted.org/freeipa/ticket/4948
---
 install/ui/src/freeipa/widget.js | 13 ++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/install/ui/src/freeipa/widget.js b/install/ui/src/freeipa/widget.js
index 6767b520ee3d388a36de743122774a462d4a4be5..29d320c07fe156a807ad2bf4415b3058a8a71e98 100644
--- a/install/ui/src/freeipa/widget.js
+++ b/install/ui/src/freeipa/widget.js
@@ -37,6 +37,7 @@ define(['dojo/_base/array',
'./entity',
'./ipa',
'./jquery',
+   './metadata',
'./navigation',
'./phases',
'./reg',
@@ -45,8 +46,9 @@ define(['dojo/_base/array',
'./util',
'exports'
],
-   function(array, lang, construct, Evented, has, keys, on, string, topic, builder, config,
-datetime, entity_mod, IPA, $, navigation, phases, reg, rpc, text, util, exp) {
+   function(array, lang, construct, Evented, has, keys, on, string,
+topic, builder, config, datetime, entity_mod, IPA, $,
+metadata, navigation, phases, reg, rpc, text, util, exp) {
 
 /**
  * Widget module
@@ -4051,12 +4053,17 @@ IPA.entity_select_widget = function(spec) {
 that.filter_options = spec.filter_options || {};
 
 that.create_search_command = function(filter) {
-return rpc.command({
+var cmd  = rpc.command({
 entity: that.other_entity.name,
 method: 'find',
 args: [filter],
 options: that.filter_options
 });
+var no_members = metadata.get('@mc-opt:' + cmd.get_command() + ':no_members');
+if (no_members) {
+cmd.set_option('no_members', true);
+}
+return cmd;
 };
 
 that.search = function(filter, on_success, on_error) {
-- 
2.1.0

-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code