Prefetch IDE resolve query
Summary: To avoid showing the Ugly spinner in the context menu as well as a better UX we prefetch the IDE resolved path. It was important to limit the concurrency of the running arc jobs otherwise lots of bad things happen and the whole machine stalls out. The general idea is as the frame comes off the wire we send them to react query to prefetch. by setting the cache time sending the same key twice will not result in 2 fetches, so we dont need to worry about deduplication on our side Reviewed By: antonk52 Differential Revision: D47210292 fbshipit-source-id: 4a1d8efdfae754c1a73c6a868b02d1f3a0a5b567
This commit is contained in:
committed by
Facebook GitHub Bot
parent
5aa0ddb0a3
commit
993413c5f2
@@ -27,6 +27,7 @@ import {Button, Spin} from 'antd';
|
||||
import {QueryClientProvider} from 'react-query';
|
||||
import {Tree2} from './Tree';
|
||||
import {StreamInterceptorErrorView} from './StreamInterceptorErrorView';
|
||||
import {queryClient} from '../reactQuery';
|
||||
|
||||
export function Component() {
|
||||
const instance = usePlugin(plugin);
|
||||
@@ -96,7 +97,7 @@ export function Component() {
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
<QueryClientProvider client={instance.queryClient}>
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<Layout.Container grow padh="small" padv="medium">
|
||||
<Layout.Top>
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user