fvp icon indicating copy to clipboard operation
fvp copied to clipboard

A Windows application made with Flutter that uses fvp has abnormally high CPU and memory usage.

Open modai07 opened this issue 2 months ago • 3 comments

Previously, I developed a Windows application using Tauri 2, which utilized the native WebView2 for video playback. When playing the same video, its CPU usage ranged from 0% to 1% and memory usage was 200MB.

When opening this video with PotPlayer, the CPU usage was also 0% and the memory usage was 180MB.

However, when integrating fvp with Flutter to play the same video, the CPU usage reaches 18% and the memory usage is 400MB.

I haven’t manually configured to disable hardware acceleration (and I don’t think this issue is related to hardware acceleration).

I wonder if other developers have encountered the same situation? Is this the case on your end too?

modai07 avatar Sep 26 '25 13:09 modai07

follow issue template. show me your log. I guess it's a flutter performance issue, the performance is poor compared to native applications and some other gui toolkit, for example Qt

wang-bin avatar Sep 27 '25 02:09 wang-bin

Additional Overhead in Flutter's Rendering Pipeline Native Player (e.g., PotPlayer/MPC-HC):

Video decoding → GPU directly renders to the window (hardware acceleration + zero-copy). Almost no CPU involvement in frame processing. Flutter + fvp:

Video decoding → Decoded frames are converted into a texture that Flutter can render (possibly involving CPU for format conversion). Flutter then uses Skia (default) or Impeller to draw the texture onto the window. This process introduces at least one additional memory copy and GPU/CPU synchronization, which incurs extra CPU usage and memory consumption, especially for high-resolution videos (1080p/4K).

modai07 avatar Sep 27 '25 02:09 modai07

all steps from decoder to renderer are on gpu

wang-bin avatar Sep 27 '25 05:09 wang-bin