GithubHelp home page GithubHelp logo

Comments (10)

igagis avatar igagis commented on August 16, 2024 1

On the obsidium's web page I found that it supports code virtualization: https://www.obsidium.de/show/details/en

I suppose you are using it. It might slow down the performance since the code is executed by virtual machine.
On the web page it says "Code Virtualization allows you to transform certain parts of your application's code". Do I understand right that by parts of the code it is meant that dll's can be excluded from virtualization? Is it possible to exclude certain functions from the main binary? If so, it might make sense to exclude svgren functions from virtualization.

The fact that only the first render is slow tells that perhaps obsidium does some code decompression/decryption at that step and then the rest of renders are fast since the code is already decompressed/decrypted.

Can you 'open up' the cSVGimage::GetCxImage function in your profiler to see in details functions that it calls and how much time is spend in each of those sub-calls? If you could identify the most lower level function which takes the most of the time it might help in understanding why it happens.

The strange thing here is that, as you say, there was no such problem with cairo. AGG does not do anything special in comparison to cairo. Are you sure that there was no any other changes to obsidium configuration since you updated to AGG-based libs?

from svgren.

saeitsystems avatar saeitsystems commented on August 16, 2024 1

Hi Ivan,
Thank you very much for your help in your free time. I will investigate tomorrow about the aspects you mentioned.
The Problem firstly appeared after the upgrade to the new agg based library.
It needed some time to recognise the problem because it only appears with the protected version.
I have to exclude the BCGPRO mfc extension library from the protection because otherwise the application crashes on simple things.
I can ask the developer of obsidium for help as well.

from svgren.

saeitsystems avatar saeitsystems commented on August 16, 2024 1

The BCG Pro Library is in an dll and is excluded from the obsidium protection.
One way to handle the problem could be to move all the svgren code to the BCGPRO dll or to a separate dll which could get excluded than as well .......

from svgren.

saeitsystems avatar saeitsystems commented on August 16, 2024 1

Hi Ivan,
after disabling the "Runtime patching" option of obsidium every thing works fine again.
The application still has the encyption and compression enabled which are the more important options.
From the obsidium help documentation:
Runtime patching
If this option is enabled, Obsidium will modify parts of your program during runtime. If you get strange program behaviour/crashes try disabling this function. This option also reduces the performance penalty caused by Runtime tracing.

Runtime tracing is still activ. As addon the application is faster now.
Thanks again for your help!

from svgren.

igagis avatar igagis commented on August 16, 2024 1

Ok, good to know!

And I did not find anything strange with the icon you have attached. Yes, it is quite simple and should not cause performance problems.

Well, anyway if the problem is caused by such feature as Runtime patching it could be almost impossible to figure out how to make the obsidium happy, as it probably does a very not obvious things with that runtime patching. So, if they recommend to disable it in case of problems, it is better to follow their advice. And also then it looks like the feature is not stable and it is better not to use it in my opinion.

Good that it works for you now!

from svgren.

igagis avatar igagis commented on August 16, 2024

I'm not familiar with obsidium, I will try to learn about it and then maybe I will get some ideas.

Some questions:
What is the first image you draw? Is it complex? What if you try to draw another image as the first one, does it affect the performance?

from svgren.

saeitsystems avatar saeitsystems commented on August 16, 2024

Hi Ivan, thanks again for your quick response.
The first image is an icon and quite simple to render. Tomorrow I will start the application with rendering a very simple Icon and report what happens.
Another approach would be to reduce or switch off compression and encryption of the app by obsidium.
But this is supposed to be the job of obsidium

from svgren.

igagis avatar igagis commented on August 16, 2024

Is this BCGPRO mfc extension library a dll or static library?

And you are welcome! I'm developing my stuff on github in my free time anyway ;)

from svgren.

igagis avatar igagis commented on August 16, 2024

Ok, moving all the svgren stuff to a separate dll would be a simple solution which most likely works. But I think it is worth asking obsidium developer for advice, maybe it can be fixed in some simple way, since cairo version worked fine, so it might be something simple.

Let me know about your findings.

from svgren.

saeitsystems avatar saeitsystems commented on August 16, 2024

Good morning, I found out that the first Icon which is rendered renders at normal speed. The second Icon causes a delay of 2,5 seconds:
2020-12-02 08_55_22-setIT LogViewer -  TraceLog CSV - C__Users_mb_AppData_Local_SAE IT-systems_setIT
I have attached both Icons.
icon-67-192.zip
The icon 192 is more complex but still simple in my opinion.

from svgren.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.