Skip to content

Lower move latency #22

@svenssonaxel

Description

@svenssonaxel

In #21 @rocketraman wrote:

It feels a bit slower than the old version, but there isn't a huge difference. I'd love to see the signature placement and move options work faster -- proper placement is difficult due to the move delay. I wonder if you can do placement using some kind of overlay rather than doing the PDF operations directly, and then only do the PDF operation at save time.

I've considered it, and a rudimentary version is very doable, but it comes with some risk:

  • It's a potential source of bugs, where what you see isn't exactly what you get. I'd like to very much avoid that.
  • It's hard to test automatically.
  • Even if tested automatically, it's difficult to ascertain that it will work on different systems.

These difficulties are recently alleviated somewhat:

  • An actual test suite is now present, that includes GUI tests.
  • The tests run in Nix, opening up the possibility to automatically test it with different desktop environments, resolutions, DPI settings etc. (It's already being tested across different python versions.)
  • The recently introduced --next functionality is a perfect tool to test whether the GUI overlay displays the same thing that the PDF operation would result in, because when you do File -> Sign & Next, the PDF operation is actually performed, and the result used as the document to sign next. Then you can select a transparent signature, and what's shown in the GUI should be the same thing that you saw before signing.

I highly suspect it will still be difficult to make screenshots match exactly, but if so, I can use already existing logic for approximate equality.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions