[ 
https://issues.apache.org/jira/browse/AIRAVATA-3380?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Marcus Christie resolved AIRAVATA-3380.
---------------------------------------
    Resolution: Fixed

> 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)

Reply via email to