perf(startup): remove blocking components loader wait; defer component instantiation until navigation; trigger initial cluster load immediately

This commit is contained in:
2025-08-31 14:27:33 +02:00
parent 8b0267ea2a
commit ac6c2fbb80
3 changed files with 19 additions and 19 deletions

View File

@@ -49,18 +49,17 @@ class ClusterViewComponent extends Component {
// Only load data if we haven't already or if the view model is empty
const members = this.viewModel.get('members');
const shouldLoadData = !this.dataLoaded || !members || members.length === 0;
const shouldLoadData = true; // always perform initial refresh quickly
if (shouldLoadData) {
logger.debug('ClusterViewComponent: Starting initial data load...');
// Initial data load - ensure it happens after mounting
setTimeout(() => {
this.viewModel.updateClusterMembers().then(() => {
this.dataLoaded = true;
}).catch(error => {
logger.error('ClusterViewComponent: Failed to load initial data:', error);
});
}, 100);
// Trigger immediately to reduce perceived startup latency
this.viewModel.updateClusterMembers().then(() => {
this.dataLoaded = true;
}).catch(error => {
logger.error('ClusterViewComponent: Failed to load initial data:', error);
});
} else {
logger.debug('ClusterViewComponent: Data already loaded, skipping initial load');
}