ric...@gmail.com
unread,May 2, 2015, 2:04:08 PM5/2/15Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to cefp...@googlegroups.com, ric...@gmail.com
Still waiting on a response about WHY the change occurred, but I can tell what I've discovered so far, during my transfer of projects.
The older CEF Python which ran CEF 1, got it's values from function returns. So if you called a python function within Javascript, the Javascript would wait until Python returns a value. This is very convenient for coding purposes, but caused trouble with timing related issues. Since the JS is waiting, any heavy loops, or never-ending loops would cause JS to wait and hang. A work-around I discovered is to use Javascript to handle timers. Not ideal, but it works.
The latest CEF Python runs CEF 3, which sends Python data to Javascript via Callbacks or direct JS calls. In this manor Python will communicate with Javascript, whenever it wants, and is not dependent on what the JS is doing. While not as simple to code for as a return value, it frees the Python to run at whatever rate it wants (fast/slow), and is not slowed down by the Javascript. JS Timers are not needed, and you can simply use Python threads to handle timers and such.
So CEF 1vs3 IMO, is like a single threaded app vs a multi-threaded app. The multi-threaded is not as easy to code, but provides the performance you want.