From 4cd7205eca767af3f22f3a5086de169fd976fc86 Mon Sep 17 00:00:00 2001 From: yinle Date: Fri, 10 Feb 2012 10:12:19 +0000 Subject: [PATCH] "getnodetype performance improvement": change getnodetype related code. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11546 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/lsslp.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/lsslp.pm b/xCAT-server/lib/xcat/plugins/lsslp.pm index c335a0de1..fc5b1a832 100644 --- a/xCAT-server/lib/xcat/plugins/lsslp.pm +++ b/xCAT-server/lib/xcat/plugins/lsslp.pm @@ -3011,8 +3011,9 @@ sub do_resetnet { if ( $req->{node} ) { $reset_all = 0; + my $typehash = xCAT::DBobjUtils->getnodetype(\@{ $req->{node}}); foreach my $nn ( @{ $req->{node}} ) { - $nodetype = xCAT::DBobjUtils->getnodetype($nn); + $nodetype = $$typehash{$nn}; # this brunch is just for the xcat 2.6(+) database if ( $nodetype =~ /^(cec|frame)$/ ) { my $cnodep = xCAT::DBobjUtils->getchildren($nn);