From 2a115f54133a72ba71f3ca61a3d4b7b4f47c9695 Mon Sep 17 00:00:00 2001 From: waynieack Date: Sun, 27 Aug 2017 00:39:30 -0500 Subject: [PATCH] More HTTP performance updates --- lib/json_server.pl | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/lib/json_server.pl b/lib/json_server.pl index 79015b8c0..d50e5e2e9 100755 --- a/lib/json_server.pl +++ b/lib/json_server.pl @@ -514,17 +514,22 @@ sub json_get { } else { - # Restrict object list by type here to make things faster - if ( $args{type} ) { - for ( @{ $args{type} } ) { - push @objects, &list_objects_by_type($_); - } - } - elsif ( $args{parents} ) { + + if ( $args{parents} ) { # Restrict object list by group here to make things faster for ( @{ $args{parents} } ) { push @objects, &list_objects_by_group( $_, 1 ) } } + elsif ( $args{category} ) { + for ( @{ $args{category} } ) { + push @objects, &list_objects_by_webname( $_ ) + } + } + elsif ( $args{type} ) { # Restrict object list by type here to make things faster + for ( @{ $args{type} } ) { + push @objects, &list_objects_by_type($_); + } + } else { foreach my $object_type ( list_object_types() ) { push @objects, &list_objects_by_type($object_type);