Answer the question
In order to leave comments, you need to log in
Delphi TChromium, hidden rendering, how to reduce graphics quality and make it run faster?
Colleagues, please tell me how to improve browser performance by reducing quality and other bells and whistles in CEF?
Here is some code
begin
if not DirectoryExists('.\cache') then
ForceDirectories('.\cache');
if not DirectoryExists('.\cookie') then
ForceDirectories('.\cookie');
INISetting := TINISetting.Create('.\setting.ini');
CurrentParsingProject := TProject.Create;
CurrentParsingProject.id := INISetting.Read('CurrentParsingProject', 'id', 0);
CurrentParsingProject.name := INISetting.Read('CurrentParsingProject', 'name', '');
CurrentParsingProject.comment := INISetting.Read('CurrentParsingProject', 'comment', '');
CurrentParsingProject.create_at := INISetting.Read('CurrentParsingProject', 'create_at', '');
GlobalCEFApp := TCefApplication.Create;
GlobalCEFApp.EnableGPU := true;
GlobalCEFApp.FastUnload := true;
GlobalCEFApp.WindowlessRenderingEnabled := true;
GlobalCEFApp.RemoteDebuggingPort := 9000;
GlobalCEFApp.OnProcessMessageReceived := GlobalCEFApp_OnProcessMessageReceived;
GlobalCEFApp.LogFile := 'debug.log';
GlobalCEFApp.LogSeverity := LOGSEVERITY_INFO;
GlobalCEFApp.Cache := '.\cache\';
GlobalCEFApp.EnableHighDPISupport := false;
GlobalCEFApp.Cookies := '.\cookie\';
GlobalCEFApp.EnableMediaStream := false;
GlobalCEFApp.SitePerProcess := false;
GlobalCEFApp.IgnoreCertificateErrors := true;
if GlobalCEFApp.StartMainProcess then
begin
Application.Initialize;
Application.CreateForm(TFormMain, FormMain);
Application.CreateForm(TFormSetting, FormSetting);
Application.CreateForm(TFormProjects, FormProjects);
Application.CreateForm(TFormNewProject, FormNewProject);
Application.Run;
end;
GlobalCEFApp.Free;
GlobalCEFApp := nil;
INISetting.Update;
INISetting.Free;
CurrentParsingProject.Free;
end.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question