Skip to content

Commit

Permalink
Merge pull request #16 from waynieack/HTTP_Updates
Browse files Browse the repository at this point in the history
More HTTP performance updates
  • Loading branch information
hplato authored Aug 27, 2017
2 parents 9534c87 + 2a115f5 commit 1a99ad7
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 1a99ad7

Please sign in to comment.