Fedict / eid-mw

eID Middleware (main repository)
GNU Lesser General Public License v3.0
198 stars 79 forks source link

eIDViewerBackend - functions eid_vwr_close_file and eid_vwr_createcallbacks take high CPU #197

Open omnicasa-kiendo opened 6 months ago

omnicasa-kiendo commented 6 months ago

Dear,

I check and see eIDViewerBackend functions (eid_vwr_close_file and eid_vwr_createcallbacks) takes high CPU when running as: image image

NOTE: I'm using .NET 4.6.2 with x86 mode. And I also try to install last EID Viewer version but this problem still happens.

Please help me review about this.

Thank you so much!!!

Frederikus commented 5 months ago

Hello,

When do you see this happening? When you are browsing after selecting "open file" from the menu?

On Fri, Mar 8, 2024 at 4:46 AM omnicasa-kiendo @.***> wrote:

Dear,

I check and see eIDViewerBackend functions (eid_vwr_close_file and eid_vwr_createcallbacks) takes high CPU when running as: image.png (view on web) https://github.com/Fedict/eid-mw/assets/11878606/98dafa92-2845-4fef-a74b-e7ec040e9cf2 image.png (view on web) https://github.com/Fedict/eid-mw/assets/11878606/6c0bee65-5c41-4dbd-8e33-9610ef961109

NOTE: I'm using .NET 4.6.2 with x86 mode. And I also try to install last EID Viewer version but this problem still happens.

Please help me review about this.

Thank you so much!!!

— Reply to this email directly, view it on GitHub https://github.com/Fedict/eid-mw/issues/197, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA4FYJDAX6XMGZBQ5OTZPOLYXEX7ZAVCNFSM6AAAAABEMES6VKVHI2DSMVQWIX3LMV43ASLTON2WKOZSGE3TKMRRHE3TEMI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

omnicasa-kiendo commented 5 months ago

Frederikus, Thank you for feedback!!!

I'm using functions from eIDViewerBackend.dll to integrate to our APP as: image

You can see code as: NavtiveMethods.zip

When starting our APP, functions (eid_vwr_close_file and eid_vwr_createcallbacks) are taking high CPU without ID card or any action from user.

Please help me review this issue.

omnicasa-kiendo commented 5 months ago

Frederikus,

I verify and see that this problem only happens if user install eID Viewer software. If I remove this software and only keep Belgium e-ID middleware, problem is solved as: image

It seems problem happens when the eIDViewerBackend.dll functions are called from eID viewer and our APP.

Frederikus commented 5 months ago

Hi Omnicasa,

Nice to see you found what causes it, but to me it is not clear what's the reason behind. I tried to reproduce by running 8 eID viewers in parallel, but I did not see high CPU usage.

Also couldn't find any similar PInvoke or c# marchalling issues on the web

On Wed, Mar 13, 2024 at 1:05 PM omnicasa-kiendo @.***> wrote:

Frederikus,

I verify and see that this problem only happens if user install eID Viewer software. If I remove this software and only keep Belgium e-ID middleware, problem is solved as: image.png (view on web) https://github.com/Fedict/eid-mw/assets/11878606/138ea0d3-741b-4be4-aea8-0d562e78c47f

It seems problem happens when the eIDViewerBackend.dll functions are called from eID viewer and our APP.

— Reply to this email directly, view it on GitHub https://github.com/Fedict/eid-mw/issues/197#issuecomment-1994225853, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA4FYJBGGEHXOWYPQFHNXYLYYA6IRAVCNFSM6AAAAABEMES6VKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJUGIZDKOBVGM . You are receiving this because you commented.Message ID: @.***>

omnicasa-kiendo commented 5 months ago

Frederikus,

This problem happens when user start our app. However, I tried to check on another PC that IS NOT install eID viewer. And our app not take high CPU from functions of eIDViewerBackend.dll.

NOTE: In case of this problem, eIDViewerBackend.dll functions takes HIGH CPU although I DO NOT plugin card reader device. Besides, our app is using 32bit mode.

Have a nice week!!!

Frederikus commented 5 months ago

Hello Omnicasa,

Just to let you know we are currently putting this one on lower priority, as we cannot reproduce it, and it only seems to be happening during launch of the application.

Wkr, Frederik

On Mon, Mar 18, 2024 at 4:43 AM omnicasa-kiendo @.***> wrote:

Frederikus,

This problem happens when user start our app. However, I tried to check on another PC that IS NOT install eID viewer. And our app not take high CPU from functions of eIDViewerBackend.dll.

NOTE: In case of this problem, eIDViewerBackend.dll functions takes HIGH CPU although I DO NOT plugin card reader device. Besides, our app is using 32bit mode.

Have a nice week!!!

— Reply to this email directly, view it on GitHub https://github.com/Fedict/eid-mw/issues/197#issuecomment-2002874181, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA4FYJANXYIDGZ4JIJTVYOLYYZPGZAVCNFSM6AAAAABEMES6VKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBSHA3TIMJYGE . You are receiving this because you commented.Message ID: @.***>