Git Product home page Git Product logo

Comments (9)

JonasKruckenberg avatar JonasKruckenberg commented on May 23, 2024 1

Interesting! I would need to do some testing to know what's going on but at a cursory glance this looks a bit like a webkit bug?
Like either a spinlock (which would be weird) or some recursive scheduling of a timeout maybe πŸ€” This is a bit intriguing nonetheless so i'll give it a look tomorrow πŸ˜‰

from padloc.

JonasKruckenberg avatar JonasKruckenberg commented on May 23, 2024 1

Okay so update: While I haven't been able to test on Linux and in the context of a Tauri app I have been running the web version of padloc on my m2 macbook pro, where it also reports excessive CPU usage related to timers (the idle app shouldn't take up 32% of my CPU time on an m2 macbook pro πŸ˜…πŸ˜‚)
While i'm not an expert on lithtml it seems like the app is re-rendering a lot and maybe? it's causing the timeout to be rescheduled on every render?
I have tested in chromium where it seems this isn't an issue.

from padloc.

BrunoBernardino avatar BrunoBernardino commented on May 23, 2024

Hey @tillmann-crabnebula there were some Tauri updates between 4.2.0 and 4.3.0, have you tried with 4.3.0? You can find it here.

from padloc.

tillmann-crabnebula avatar tillmann-crabnebula commented on May 23, 2024

Hey, I just tested this with 4.3.0 and I could reproduce the behavior.
I found the webkitgtk process to take the high CPU usage once the clipboard countdown is shown.

from padloc.

BrunoBernardino avatar BrunoBernardino commented on May 23, 2024

Thanks @tillmann-crabnebula !

@JonasKruckenberg is there anything we can do to mitigate this? The element is pretty simple and uses a setTimeout.

from padloc.

BrunoBernardino avatar BrunoBernardino commented on May 23, 2024

What do you think @MaKleSoft ? You're the lit-html expert here!

from padloc.

MaKleSoft avatar MaKleSoft commented on May 23, 2024

First off, the element in question is pl-clipboard, not pl-notification like Bruno said. Still, it's a pretty basic component though and although it uses setInterval, the interval duration is set at 1 second, so that certainly shouldn't take up that many resources.

Unfortunately I couldn't reproduce @tillmann-crabnebula's problem with the clipboard notification, but I do also see a ~30% CPU load for the idle app in Safari on my M2 Air, so there's definitely something wrong there. At first glance, it looks like the pl-totp element might be the culprit. I do remember there being some performance issues with that one in the past, which I thought we had fixed, but maybe the fix simply didn't work in Safari. Gonna have to dig a little deeper on that. @JonasKruckenberg Do you happen to have a lot of TOTP fields in your vaults?

from padloc.

JonasKruckenberg avatar JonasKruckenberg commented on May 23, 2024

Yeah I think most of my fields should include totp data so about 20ish

from padloc.

tjmaru avatar tjmaru commented on May 23, 2024

Hello,
Seems to me I faced with a similar issue with overloading CPU.
I've configured padloc on my arm64 instance with 4 cores and 24GB of RAM. (for details it's a VM on Oracle Cloud).
For test purposes, during adding a 2FA for the account using TOTP, on the step of confirming 6 dig code the CPU load dramatically increased up to 100% and padloc-server never answered until I restart it.

Padloc works in docker container without any specific limitation on CPU/Mem.
In this installation Padloc was empty.
Process which consume CPU in my top is node /padloc/packages/server/node_modules/.bin/ts-node src/init.ts

BTW, adding a hardware key is works fine. I'm using google titanium USB key.

UPD: the same issue I have with the x86_64 arch on ubuntu 22.

from padloc.

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.