You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@airavata.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2020/10/30 13:59:00 UTC

[jira] [Commented] (AIRAVATA-3380) ExperimentViewSet.jobs is slow

    [ https://issues.apache.org/jira/browse/AIRAVATA-3380?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17223663#comment-17223663 ] 

ASF subversion and git services commented on AIRAVATA-3380:
-----------------------------------------------------------

Commit 87fa4ea557c64e96c5f180bfed657cc90aa15ac1 in airavata-django-portal's branch refs/heads/develop from Marcus Christie
[ https://gitbox.apache.org/repos/asf?p=airavata-django-portal.git;h=87fa4ea ]

AIRAVATA-3380 Remove unused and poorly performing ExperimentViewSet.get_list()


> ExperimentViewSet.jobs is slow
> ------------------------------
>
>                 Key: AIRAVATA-3380
>                 URL: https://issues.apache.org/jira/browse/AIRAVATA-3380
>             Project: Airavata
>          Issue Type: Improvement
>          Components: Django Portal
>            Reporter: Marcus Christie
>            Assignee: Marcus Christie
>            Priority: Major
>
> The ExperimentViewSet.jobs REST API returns the job details for all jobs for an experiment. During some testing of AIRAVATA-3372 I noticed that this REST API was returning slowly, sometimes timing out. I thought this REST API was only calling the Airavata getJobDetails API method, but it turns out in Django REST Framework the ExperimentViewSet.get_queryset() was also getting called; I'm not sure why but it appears that if a {{@detail_route}} returns a list of serialized objects (Serializer with many=True) then get_queryset() is called. get_queryset() calls get_list() which for ExperimentViewSet calls the Airavata getUserExperiments API method.
> To fix this I plan to do a couple things:
> - we never used ExperimentViewSet.get_list() to list experiments and the implementation is non-optimal since it doesn't utilize paging, so I'm going to just remove it. The experiment search REST API should be used instead to list experiments.
> - for ViewSets that don't have a {{list}} route, I'm going to have the GenericAPIBackedViewSet.get_queryset() method return None instead of calling get_list() so that those ViewSets won't have to implement get_list() just to have a multivalued @detail_route



--
This message was sent by Atlassian Jira
(v8.3.4#803005)