feat(performance): enhance application performance with optimizations and monitoring
- Updated package dependencies for improved localization support and performance. - Introduced CSS performance optimizations to prevent layout shifts and enhance rendering efficiency. - Implemented asset preloading and lazy loading strategies for critical components to improve load times. - Enhanced translation loading with optimized caching and background loading strategies. - Added performance monitoring utilities to track key metrics and improve user experience. - Refactored task management components to utilize new performance features and ensure efficient rendering. - Introduced new utility functions for asset and CSS optimizations to streamline resource management.
This commit is contained in:
@@ -77,6 +77,12 @@ import { fetchLabels } from '@/features/taskAttributes/taskLabelSlice';
|
||||
import ImprovedTaskFilters from './improved-task-filters';
|
||||
import PerformanceAnalysis from './performance-analysis';
|
||||
|
||||
// Import asset optimizations
|
||||
import { AssetPreloader, LazyLoader } from '@/utils/asset-optimizations';
|
||||
|
||||
// Import performance monitoring
|
||||
import { CustomPerformanceMeasurer } from '@/utils/enhanced-performance-monitoring';
|
||||
|
||||
// Import drag and drop performance optimizations
|
||||
import './drag-drop-optimized.css';
|
||||
import './optimized-bulk-action-bar.css';
|
||||
@@ -210,13 +216,39 @@ const TaskListBoard: React.FC<TaskListBoardProps> = ({ projectId, className = ''
|
||||
return () => clearInterval(interval);
|
||||
}, []);
|
||||
|
||||
// Initialize asset optimization
|
||||
useEffect(() => {
|
||||
// Preload critical task management assets
|
||||
AssetPreloader.preloadAssets([
|
||||
{ url: '/icons/task-status.svg', priority: 'high' },
|
||||
{ url: '/icons/priority-high.svg', priority: 'high' },
|
||||
{ url: '/icons/priority-medium.svg', priority: 'high' },
|
||||
{ url: '/icons/priority-low.svg', priority: 'high' },
|
||||
{ url: '/icons/phase.svg', priority: 'medium' },
|
||||
{ url: '/icons/assignee.svg', priority: 'medium' },
|
||||
]);
|
||||
|
||||
// Preload critical images for better performance
|
||||
LazyLoader.preloadCriticalImages([
|
||||
'/icons/task-status.svg',
|
||||
'/icons/priority-high.svg',
|
||||
'/icons/priority-medium.svg',
|
||||
'/icons/priority-low.svg',
|
||||
]);
|
||||
}, []);
|
||||
|
||||
// Fetch task groups when component mounts or dependencies change
|
||||
useEffect(() => {
|
||||
if (projectId && !hasInitialized.current) {
|
||||
hasInitialized.current = true;
|
||||
|
||||
// Measure task loading performance
|
||||
CustomPerformanceMeasurer.mark('task-load-time');
|
||||
|
||||
// Fetch real tasks from V3 API (minimal processing needed)
|
||||
dispatch(fetchTasksV3(projectId));
|
||||
dispatch(fetchTasksV3(projectId)).finally(() => {
|
||||
CustomPerformanceMeasurer.measure('task-load-time');
|
||||
});
|
||||
}
|
||||
}, [projectId, dispatch]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user