GithubHelp home page GithubHelp logo

Comments (9)

anarcat avatar anarcat commented on September 2, 2024 1

pastebin: "This page has been removed!"

the other page is in russian - can you translate?

from maim.

naelstrof avatar naelstrof commented on September 2, 2024

If I remember correctly, the pastebin was evidence that maim performed poorly compared to other screen shooters by a couple milliseconds. I believe it's due to maim doing some masking when multiple monitors are involved.

from maim.

anarcat avatar anarcat commented on September 2, 2024

ah. interesting. it'd sure be nice to have an idea of how to reproduce those results...

from maim.

naelstrof avatar naelstrof commented on September 2, 2024

Here's a script I made for it.

!/bin/sh

echo "import timing"
echo "---"
time for i in {1..10}; do
    import -window root -define png:compression-level=9 test.png;
done
echo "
"

echo "scrot timing"
echo "---"
time for i in {1..10}; do
    scrot --quality 0 test.png;
done
echo "
"

echo "maim timing"
echo "---"
time for i in {1..10}; do
    maim --quality=10 test.png;
done
echo "
"

and the result

import timing
---

real	0m3.146s
user	0m2.950s
sys	0m0.130s


scrot timing
---

real	0m2.198s
user	0m2.043s
sys	0m0.067s


maim timing
---

real	0m2.468s
user	0m2.283s
sys	0m0.117s

Scrot wins, Imlib2 is a pretty optimized library. Though maim does pretty well for using a homebrewed image library.

from maim.

anarcat avatar anarcat commented on September 2, 2024

i get a syntax error with your script, but that's a good indicator... here are my results and updated script:

[1026]anarcat@curie:~$ cat bench-snaps 
#!/bin/bash

output=test.png

echo "import timing"
echo "---"
time for i in {1..10}; do
    import -window root "$output";
done
echo

echo "scrot timing"
echo "---"
time for i in {1..10}; do
    scrot "$output";
done
echo

echo "maim timing"
echo "---"
time for i in {1..10}; do
    maim "$output";
done
echo

[1025]anarcat@curie:~$ ./bench-snaps 
import timing
---

real	0m2,389s
user	0m2,260s
sys	0m0,088s

scrot timing
---

real	0m1,222s
user	0m1,152s
sys	0m0,016s

maim timing
---

real	0m1,580s
user	0m1,488s
sys	0m0,032s

i wonder why maim has its own image lib...

from maim.

naelstrof avatar naelstrof commented on September 2, 2024

maim has it's own image lib because of this: #71.
imlib2 was bugged and unmaintained causing maim to break.

from maim.

naelstrof avatar naelstrof commented on September 2, 2024

Oh and I just noticed you removed all of the quality settings. That's unfair given they all default to different values.

Scrot, when its quality is set to 0, gives the maximum amount of compression to pngs (9). Maim defaults to the maximum compression, and I didn't check what import does by default.

from maim.

anarcat avatar anarcat commented on September 2, 2024

that is deliberate: i don't really care what compression is used. most people will always use the defaults so that should be what is compared, not some tweaked setting...

from maim.

anarcat avatar anarcat commented on September 2, 2024

notice how the relative speed was not really changed anyways...

from maim.

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.