{"action":"closed","issue":{"url":"https://api.github.com/repos/NCEAS/metacatui/issues/580","repository_url":"https://api.github.com/repos/NCEAS/metacatui","labels_url":"https://api.github.com/repos/NCEAS/metacatui/issues/580/labels{/name}","comments_url":"https://api.github.com/repos/NCEAS/metacatui/issues/580/comments","events_url":"https://api.github.com/repos/NCEAS/metacatui/issues/580/events","html_url":"https://github.com/NCEAS/metacatui/issues/580","id":315998874,"number":580,"title":"Refactor package loading pattern to avoid calls to /meta and /object","user":{"login":"amoeba","id":563,"avatar_url":"https://avatars2.githubusercontent.com/u/563?v=4","gravatar_id":"","url":"https://api.github.com/users/amoeba","html_url":"https://github.com/amoeba","followers_url":"https://api.github.com/users/amoeba/followers","following_url":"https://api.github.com/users/amoeba/following{/other_user}","gists_url":"https://api.github.com/users/amoeba/gists{/gist_id}","starred_url":"https://api.github.com/users/amoeba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amoeba/subscriptions","organizations_url":"https://api.github.com/users/amoeba/orgs","repos_url":"https://api.github.com/users/amoeba/repos","events_url":"https://api.github.com/users/amoeba/events{/privacy}","received_events_url":"https://api.github.com/users/amoeba/received_events","type":"User","site_admin":false},"labels":[{"id":47935393,"url":"https://api.github.com/repos/NCEAS/metacatui/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"closed","locked":false,"assignee":{"login":"laurenwalker","id":6643222,"avatar_url":"https://avatars2.githubusercontent.com/u/6643222?v=4","gravatar_id":"","url":"https://api.github.com/users/laurenwalker","html_url":"https://github.com/laurenwalker","followers_url":"https://api.github.com/users/laurenwalker/followers","following_url":"https://api.github.com/users/laurenwalker/following{/other_user}","gists_url":"https://api.github.com/users/laurenwalker/gists{/gist_id}","starred_url":"https://api.github.com/users/laurenwalker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laurenwalker/subscriptions","organizations_url":"https://api.github.com/users/laurenwalker/orgs","repos_url":"https://api.github.com/users/laurenwalker/repos","events_url":"https://api.github.com/users/laurenwalker/events{/privacy}","received_events_url":"https://api.github.com/users/laurenwalker/received_events","type":"User","site_admin":false},"assignees":[{"login":"laurenwalker","id":6643222,"avatar_url":"https://avatars2.githubusercontent.com/u/6643222?v=4","gravatar_id":"","url":"https://api.github.com/users/laurenwalker","html_url":"https://github.com/laurenwalker","followers_url":"https://api.github.com/users/laurenwalker/followers","following_url":"https://api.github.com/users/laurenwalker/following{/other_user}","gists_url":"https://api.github.com/users/laurenwalker/gists{/gist_id}","starred_url":"https://api.github.com/users/laurenwalker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laurenwalker/subscriptions","organizations_url":"https://api.github.com/users/laurenwalker/orgs","repos_url":"https://api.github.com/users/laurenwalker/repos","events_url":"https://api.github.com/users/laurenwalker/events{/privacy}","received_events_url":"https://api.github.com/users/laurenwalker/received_events","type":"User","site_admin":false}],"milestone":null,"comments":6,"created_at":"2018-04-19T18:54:03Z","updated_at":"2018-04-23T18:55:03Z","closed_at":"2018-04-23T18:55:03Z","author_association":"CONTRIBUTOR","body":"I have a deeply nested package on test.arcticdata.io at https://test.arcticdata.io/#view/urn:uuid:dd7d8b46-04ce-48bf-b335-005fe7a83063. I just visited that page and noticed the package table took a really long time to show up. I then popped open Chrome devtools and saw an endless stream of XHR requests being sent out. test.arctic appears to be running MetacatUI 2.0.0 RC5.\r\n\r\n![kapture 2018-04-19 at 10 47 10](https://user-images.githubusercontent.com/563/39011832-127a002c-43bf-11e8-9ada-8fb03093f22e.gif)\r\n\r\nA lot of the calls early on are to solr but then the requests eventually become calls to /meta and /object for a ton of different PIDs. I suspect that these /meta and /object calls are for the Objects contained in this package's hierarchy (of which there are many). As of 3 minutes in, I'm at 1462 requests and they're still going strong. If I look for the source of the XHR calls, I see this:\r\n\r\nhttps://github.com/NCEAS/metacatui/blob/838c35716a4667007990e9da8368fb29aeafd42f/src/js/collections/DataPackage.js#L454-L472\r\n\r\nCorrect me if I'm wrong, but I think this code calls /meta and /object. \r\n\r\n- Is this correct? If so, I can't see how this can be performant.\r\n- Does anyone know why this needs to happen?\r\n- I don't yet know why the calls are endless\r\n- I haven't yet looked into the other types of calls being made\r\n\r\nI'm going to keep looking at this a bit but any and all help would be appreciated."}}
{"actor":{"display_login":"laurenwalker"}}