mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
[TESTING] Remove global isReady checking
I dont believe this is need at all because the isready state is constantly updated when needed and tracked real time in the Redux store. This causes massive re-renders. @psychedelicious If this is absolutely essential for a reason that I do not see, please hit me up on Discord.
This commit is contained in:
parent
b2879ca99f
commit
ea6e3a7949
@ -15,10 +15,9 @@ import { createSelector } from '@reduxjs/toolkit';
|
|||||||
import { GalleryState } from '../features/gallery/gallerySlice';
|
import { GalleryState } from '../features/gallery/gallerySlice';
|
||||||
import { OptionsState } from '../features/options/optionsSlice';
|
import { OptionsState } from '../features/options/optionsSlice';
|
||||||
import { activeTabNameSelector } from '../features/options/optionsSelectors';
|
import { activeTabNameSelector } from '../features/options/optionsSelectors';
|
||||||
import { readinessChanged, SystemState } from '../features/system/systemSlice';
|
import { SystemState } from '../features/system/systemSlice';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { Model } from './invokeai';
|
import { Model } from './invokeai';
|
||||||
import { readinessSelector } from './selectors/readinessSelector';
|
|
||||||
|
|
||||||
keepGUIAlive();
|
keepGUIAlive();
|
||||||
|
|
||||||
@ -80,7 +79,7 @@ const App = () => {
|
|||||||
const dispatch = useAppDispatch();
|
const dispatch = useAppDispatch();
|
||||||
|
|
||||||
// const [isReady, setIsReady] = useState<boolean>(false);
|
// const [isReady, setIsReady] = useState<boolean>(false);
|
||||||
const { isReady, reasonsWhyNotReady } = useAppSelector(readinessSelector);
|
// const { isReady, reasonsWhyNotReady } = useAppSelector(readinessSelector);
|
||||||
const { shouldShowGalleryButton, shouldShowOptionsPanelButton } =
|
const { shouldShowGalleryButton, shouldShowOptionsPanelButton } =
|
||||||
useAppSelector(appSelector);
|
useAppSelector(appSelector);
|
||||||
|
|
||||||
@ -88,9 +87,9 @@ const App = () => {
|
|||||||
dispatch(requestSystemConfig());
|
dispatch(requestSystemConfig());
|
||||||
}, [dispatch]);
|
}, [dispatch]);
|
||||||
|
|
||||||
useEffect(() => {
|
// useEffect(() => {
|
||||||
dispatch(readinessChanged({ isReady, reasonsWhyNotReady }));
|
// dispatch(readinessChanged({ isReady, reasonsWhyNotReady }));
|
||||||
}, [dispatch, isReady, reasonsWhyNotReady]);
|
// }, [dispatch, isReady, reasonsWhyNotReady]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="App">
|
<div className="App">
|
||||||
|
Loading…
Reference in New Issue
Block a user