Closed ghost closed 5 years ago
This issue was temporary solved for Dataset Version 1.
Since this is a general architectural problem, I reassigned it to our milestone for Dataset Version 2.
This issue was solved by using CefRequestHandler
to modify the request hear prior sending it out.
I am very happy to say that we can stick with our current architecture :) !
We currently face following problem, which is very specific to our use-case:
As part of the initialization process of CEF,
CefInitialize()
has to be called before using CEF functionalities.CefInitialize()
andCefExecuteProcess()
will create required processes such asUI
,Render
as described here.CefInitialize()
is being called with aCefSetting
-object, representing settings such as the user-agent of the browsers created during this session.Our current approach was to initialize CEF only once and create multiple browsers instances. But due to new requirements for #6, we have to take screenshots for mobile devices. This can only be achieved by setting the user-agent to a mobile device.
Due to lack of dynamically changing the user-agent, we have to reinitialize CEF. According to this and own experiences this is not possible within the same process. This leads us to a change in architecture:
1) Spawn for each datamodule a process 2) Use boost::interprocess to pass results from the child to the parent 3) Examine average memory consumption and decide whether to spawn all childprocesses at once or not
Best, Samed