Skip to content

Commit

Permalink
More HTTP performance updates
Browse files Browse the repository at this point in the history
  • Loading branch information
waynieack committed Aug 27, 2017
1 parent 91caa45 commit 2a115f5
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions lib/json_server.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 2a115f5

Please sign in to comment.