Hello,
I've been trying to find any info on this. But did not.
I would want to lazy initialize GlobalCEFApp on before window create, and then show web-content to user, and possibly free all resources when user is done.
initializing GlobalCEFApp in dpr takes quite long time, and also most cases for us, not necessary at all. MAybe 10% users/use cases would need use that feature on given day. So initializing it always seems like overkill. (if can avoided)
-Tee-
Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
Is it in anyway possible to lazy initialize GlobalCEFApp?
-
- Posts: 3
- Joined: Wed Mar 03, 2021 11:50 am
- salvadordf
- Posts: 4580
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Is it in anyway possible to lazy initialize GlobalCEFApp?
Hi,
Yes, you can create GlobalCEFApp at any moment if you use a different EXE for the CEF subprocesses.
See the "SubProcess" demo for all the details.
Yes, you can create GlobalCEFApp at any moment if you use a different EXE for the CEF subprocesses.
See the "SubProcess" demo for all the details.
-
- Posts: 3
- Joined: Wed Mar 03, 2021 11:50 am
-
- Posts: 3
- Joined: Wed Mar 03, 2021 11:50 am
Re: Is it in anyway possible to lazy initialize GlobalCEFApp?
Made some chamges to there, also made demo that is close what I would need.
If you want to include in to the projet be my quest, also if don't like something I can do some changes,
Mainly changes are
If you want to include in to the projet be my quest, also if don't like something I can do some changes,
Mainly changes are
- Common unit and method for initialization
- SubProcess Define to difrentiate differences in initialization
- Some minor changes to the coding style (Make it easier to debug if then ; not on same line etc trivial)
- Made simple demo app to have separate browser window which initializes Global object and so only when needed, seems to work OK.
You do not have the required permissions to view the files attached to this post.
Last edited by Tomm Prami on Fri Mar 05, 2021 11:52 am, edited 1 time in total.
-
- Posts: 3
- Joined: Wed Mar 03, 2021 11:50 am
Re: Is it in anyway possible to lazy initialize GlobalCEFApp?
Do I make Pull request for that demo? or will you merge it your self? Or?
-Tee-
-Tee-
- salvadordf
- Posts: 4580
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Is it in anyway possible to lazy initialize GlobalCEFApp?
Thanks for the code!
I'll take a look as soon as I have more time and integrate it manually.
I'll take a look as soon as I have more time and integrate it manually.
Re: Is it in anyway possible to lazy initialize GlobalCEFApp?
Demo DLLBrowser
Almost the same thing but probably better because when you close the browser will be completely destroyed. In one application, this is apparently not real.
Almost the same thing but probably better because when you close the browser will be completely destroyed. In one application, this is apparently not real.