out of process texture?

Started by
5 comments, last by user0 11 years, 6 months ago
I am running a web browser that is rendering to a texture and would like to make it out of process I havent yet started so I cannot say how performance would be but im looking for thoughts on how to do it the best way. In my mind the only way I can do this is horribly inefficient
1. browser renders in its process
2. data is copied and sent to the main process
3. main process binds texture and renders

That seems like quite a bit of memory copying is that the only way to do this or is there a way the browser process can send directly to the gpu?

I guess another option would be some kind of shared memory between processes that way a copy doesnt have to be made but I would like to know what you all think. Thanks
Advertisement
There might be a better solution if we had context on the problem.
What is the browser drawing?
Why does the browser need to draw it?
Why does it need to then be drawn again in another process?
How frequently does this transfer of images occur?


L. Spiro

I restore Nintendo 64 video-game OST’s into HD! https://www.youtube.com/channel/UCCtX_wedtZ5BoyQBXEhnVZw/playlists?view=1&sort=lad&flow=grid

Right now its the awesomium web browser library but im considering going to something else like berkelium
Its a web browser so it renders the html of the websites
Maybe draw is not the right word it has to render a 2d image of it then send it to opengl which is in the parent process to be drawn to the screen
It doesnt have to be out of process but would be nice to handle crashes and lockups
From a little bit of testing its all over the map on transfers something like google.com is twice or so per second but things with flash gifs movies will update as many time as I ask
It’s a library, not an external process. It is meant to be integrated into your application, to result in still one application.
Is there any reason you can’t do this?
It seems to me that if you are planning to have these as separate applications, it means you do have control over the library (or else how would you make it work so that it could send the results remotely?) and thus have the ability to instead just make them one application. Furthermore, it’s just not possible that they meant for their library to be used that way. They would never have any form of commercial success or be able to market it to any serious person/company/entity.
Are you really really sure you can’t just make it all one application?


L. Spiro

I restore Nintendo 64 video-game OST’s into HD! https://www.youtube.com/channel/UCCtX_wedtZ5BoyQBXEhnVZw/playlists?view=1&sort=lad&flow=grid

I have it as one application as it is I want it as a separate process to handle crashes which isnt a problem im just trying to think of the best way to minimise the overhead and not make three copies of the same data for each update thats alot of memory bandwidth.
If you are worried about their library crashing, that can obviously only happen when you actually call their functions, and the easy/safe route is to simply wrap those calls behind some wrappers which internally call the library functions inside try/catch blocks.
If the library crashes your overall application walks away fine.

If you are worried about your main application crashing rather than the library crashing, that wouldn’t help you to keep them as separate processes. The library application is a slave to the main application. If the main crashes it’s over. You have to restart it.
Then there is the obvious fact that it is your code, so instead of hacking together 2 different applications, better advice would be to simply fix your code so that it doesn’t crash.


I am going to assume you are more worried about the library crashing, and exception handlers will put a quick end to that.
Last chance to repent. Is there any reason why you would rather go the slow, difficult, and hacky route of having 2 processes instead of 1 easy-to-make and better-performing process with exception handling?


L. Spiro

I restore Nintendo 64 video-game OST’s into HD! https://www.youtube.com/channel/UCCtX_wedtZ5BoyQBXEhnVZw/playlists?view=1&sort=lad&flow=grid

Well I thought about it and slept on it and I think your right about it as long as the try catch can catch everything that way there doesnt have to be out of process communication. I will have to put together some tests that intentionally kill/lock up the external libraries I plan on using and hopefully everything can be handled that way. I was just thinking like chrome where all tabs are a different process and each page can die individually. I am still worried about lock ups because then it will never return and never be thrown to catch so it may lock up the whole program so ill have to figure out how that is handled. Thanks

This topic is closed to new replies.

Advertisement