Re: [Interest] Qt 5.12 Beta 3 slows down ext Javascript library (RSA encrypt)

2018-11-05 Thread Thiago Macieira
On Monday, 5 November 2018 21:30:47 PST Tomasz Olszak wrote:
> Still there is a performance regression somewhere and while the C++
> solution is most performant the cause of this regression can hit other
> parts of Qml stack.

Not necessarily. This may be a side-effect of performance improvements 
elsewhere. If you can show a realistic workload (not encryption) that is 
getting considerably slow, report it. It'll probably get a high priority.

Encryption won't get high priority.

> Ekke do you use prebuilt binaries or do you compile them yourself?
> 
> If you compile yourself you can bisect and find the cause. Not many
> patches landed in qtdeclarative in 5.11.3:

If you compile yourself, confirm those are release binaries.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center



___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt 5.12 Beta 3 slows down ext Javascript library (RSA encrypt)

2018-11-05 Thread ekke
Am 06.11.18 um 06:30 schrieb Tomasz Olszak:
> Still there is a performance regression somewhere and while the C++
> solution is most performant
will try again to find a C++ solution for Android, iOS
>  the cause of this regression can hit other
> parts of Qml stack.
have created bug with example app
https://bugreports.qt.io/browse/QTBUG-71591
> Ekke do you use prebuilt binaries or do you compile them yourself?
sorry, I'm only using prebuilt binaries
... and it's even much work to test my complex mobile apps against 5.10,
5.11, 5.12, QtC 4.7.x, 4.8Beta, all the iOS / Android versions /
devices/ ... ;-)

ekke
>
> If you compile yourself you can bisect and find the cause. Not many
> patches landed in qtdeclarative in 5.11.3:
>
> 4a886753a Accessible: Return StaticText if there is no explicit role set
> 0f0ed2070 At least warn when triggering a rendering limitation
> 614d16d6f Doc: place more importance on not binding to x/y/width/height
> 7f57472e2 Warn, don't crash during nested delivery of mouse or touch presses
> 1ce94fc0f Qt Labs Settings: warn if failed to initialize internal
> QSettings instance
> 7ca32bc41 qmlplugindump: Remove sigsegv handler
> 453a3806a Document that aliases cannot point to attached properties
> 10095542d Fix crash in QQuickAnimatorProxyJob::sceneGraphInitialized()
> 9cb13a422 QQuickItem: document which events are accepted by default
> 074190902 Mark QML captured scope/context loads as having side effects
> f27a16b7b Don't get confused about the grabber during replayDelayedPress
> 3bdb3c1d8 Amend TouchMouse::buttonOnDelayedPressFlickable to test delayed tap
> 934d93b91 YarrJIT: disable MatchResult decoding constructor on 64bit
> ec1fdecef Add QQuickItemPrivate::updateOrAddItemChangeListener()
> 777cd6e9b Add QT_CONFIG(filesystemwatcher) guard for include
> 039a28468 Fix Integrity OS allocator memory attributes
> 4441cefd7 Doc: Remove wrong ';' from Q_PROPERTY example
> 8fd398c9d Prevent PathView's parent stealing mouse grab during double-flick
>
>
> wt., 6 lis 2018 o 06:20 Thiago Macieira  
> napisał(a):
>> On Monday, 5 November 2018 11:32:03 PST ekke wrote:
>>> Thanks, Thiago for the hint - that was the first thing I tried, but
>>> couldn't figure out HowTo make it work on Android and iOS.
>>> unfortunately now with 5.12 Beta it slows down by 20x.
>> Then get a 400x improvement by trying the C++ part again. OpenSSL is easy on
>> Android, since you'll have to deploy it anyway alongside your application.
>>
>> On iOS and macOS, you shouldn't use OpenSSL. You should use Apple's API,
>> whatever it is. Please consult Apple's website.
>>
>> --
>> Thiago Macieira - thiago.macieira (AT) intel.com
>>   Software Architect - Intel Open Source Technology Center
>>
>>
>>
>> ___
>> Interest mailing list
>> Interest@qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/interest
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt 5.12 Beta 3 slows down ext Javascript library (RSA encrypt)

2018-11-05 Thread ekke
Am 06.11.18 um 06:20 schrieb Thiago Macieira:
> On Monday, 5 November 2018 11:32:03 PST ekke wrote:
>> Thanks, Thiago for the hint - that was the first thing I tried, but
>> couldn't figure out HowTo make it work on Android and iOS.
>> unfortunately now with 5.12 Beta it slows down by 20x.
> Then get a 400x improvement by trying the C++ part again. OpenSSL is easy on 
> Android, since you'll have to deploy it anyway alongside your application.
>
> On iOS and macOS, you shouldn't use OpenSSL. You should use Apple's API, 
> whatever it is. Please consult Apple's website.
>
Hi Thiago,

thx motivating me ;-)

will give it another try

over all my apps always use C++ as much as possible - this single
use-case is an exception. would be happy to move it to C++

ekke

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt 5.12 Beta 3 slows down ext Javascript library (RSA encrypt)

2018-11-05 Thread Tomasz Olszak
Still there is a performance regression somewhere and while the C++
solution is most performant the cause of this regression can hit other
parts of Qml stack.
Ekke do you use prebuilt binaries or do you compile them yourself?

If you compile yourself you can bisect and find the cause. Not many
patches landed in qtdeclarative in 5.11.3:

4a886753a Accessible: Return StaticText if there is no explicit role set
0f0ed2070 At least warn when triggering a rendering limitation
614d16d6f Doc: place more importance on not binding to x/y/width/height
7f57472e2 Warn, don't crash during nested delivery of mouse or touch presses
1ce94fc0f Qt Labs Settings: warn if failed to initialize internal
QSettings instance
7ca32bc41 qmlplugindump: Remove sigsegv handler
453a3806a Document that aliases cannot point to attached properties
10095542d Fix crash in QQuickAnimatorProxyJob::sceneGraphInitialized()
9cb13a422 QQuickItem: document which events are accepted by default
074190902 Mark QML captured scope/context loads as having side effects
f27a16b7b Don't get confused about the grabber during replayDelayedPress
3bdb3c1d8 Amend TouchMouse::buttonOnDelayedPressFlickable to test delayed tap
934d93b91 YarrJIT: disable MatchResult decoding constructor on 64bit
ec1fdecef Add QQuickItemPrivate::updateOrAddItemChangeListener()
777cd6e9b Add QT_CONFIG(filesystemwatcher) guard for include
039a28468 Fix Integrity OS allocator memory attributes
4441cefd7 Doc: Remove wrong ';' from Q_PROPERTY example
8fd398c9d Prevent PathView's parent stealing mouse grab during double-flick


wt., 6 lis 2018 o 06:20 Thiago Macieira  napisał(a):
>
> On Monday, 5 November 2018 11:32:03 PST ekke wrote:
> > Thanks, Thiago for the hint - that was the first thing I tried, but
> > couldn't figure out HowTo make it work on Android and iOS.
>
> > unfortunately now with 5.12 Beta it slows down by 20x.
>
> Then get a 400x improvement by trying the C++ part again. OpenSSL is easy on
> Android, since you'll have to deploy it anyway alongside your application.
>
> On iOS and macOS, you shouldn't use OpenSSL. You should use Apple's API,
> whatever it is. Please consult Apple's website.
>
> --
> Thiago Macieira - thiago.macieira (AT) intel.com
>   Software Architect - Intel Open Source Technology Center
>
>
>
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt 5.12 Beta 3 slows down ext Javascript library (RSA encrypt)

2018-11-05 Thread Thiago Macieira
On Monday, 5 November 2018 11:32:03 PST ekke wrote:
> Thanks, Thiago for the hint - that was the first thing I tried, but
> couldn't figure out HowTo make it work on Android and iOS.

> unfortunately now with 5.12 Beta it slows down by 20x.

Then get a 400x improvement by trying the C++ part again. OpenSSL is easy on 
Android, since you'll have to deploy it anyway alongside your application.

On iOS and macOS, you shouldn't use OpenSSL. You should use Apple's API, 
whatever it is. Please consult Apple's website.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center



___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt 5.12 Beta 3 slows down ext Javascript library (RSA encrypt)

2018-11-05 Thread ekke
Am 05.11.18 um 17:59 schrieb Thiago Macieira:
> On Monday, 5 November 2018 05:49:33 PST ekke wrote:
>> created a example app and now noticed, the app doesn't freeze,
>> but the exection of encrypt() slows down from
>>
>> 5 sec (Qt 5.11.2) to
>> 92 sec (Qt 5.12 Beta3)
>>
>> will open a bug report
> How about you encrypt using C++ instead? OpenSSL probably has the encryption 
> you need.
>
Thanks, Thiago for the hint - that was the first thing I tried, but
couldn't figure out HowTo make it work on Android and iOS.

It's only used when password has changed and must be entered: then
password must be RSA encrypted and base64 sent to server

so I was happy to find a JS solution which was implemented easy for
Android / iOS:

function doEncrypt() {
    var rsa = new MyRsa.RSAKey();
    rsa.setPublic(dataServer.modulusHex(), "10001")
    var res = rsa.encrypt(pwText.text)
    if(res) {
    return MyRsa.linebrk(res, 64)
    } else {
    return ""
    }
}

unfortunately now with 5.12 Beta it slows down by 20x.

on Android per ex. from 80 ms to 1700 ms (acceptable for my customer)

but iOS now is too slow

ekke

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt 5.12 Beta 3 slows down ext Javascript library (RSA encrypt)

2018-11-05 Thread Thiago Macieira
On Monday, 5 November 2018 05:49:33 PST ekke wrote:
> created a example app and now noticed, the app doesn't freeze,
> but the exection of encrypt() slows down from
> 
> 5 sec (Qt 5.11.2) to
> 92 sec (Qt 5.12 Beta3)
> 
> will open a bug report

How about you encrypt using C++ instead? OpenSSL probably has the encryption 
you need.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center



___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt 5.12 Beta 3 slows down ext Javascript library (RSA encrypt)

2018-11-05 Thread ekke
created a example app and now noticed, the app doesn't freeze,
but the exection of encrypt() slows down from

5 sec (Qt 5.11.2) to
92 sec (Qt 5.12 Beta3)

will open a bug report

Am 05.11.18 um 12:00 schrieb ekke:
> Qt 5.12 Beta 3. Android and iOS
>
> in one of my apps I had to encrypt the user password using a JavaScript
> library
>
> http://www-cs-students.stanford.edu/%7Etjw/jsbn/
>
> from there I put these .js into resources:
>
> 
>     
>     js/rsbn/base64.js
>     js/rsbn/jsbn.js
>     js/rsbn/prng4.js
>     js/rsbn/rng.js
>     js/rsbn/rsa.js
>     
> 
>
> in QML:
>
> import "../../js/rsbn/jsbn.js" as MyJsbn
> import "../../js/rsbn/rsa.js" as MyRsa
> import "../../js/rsbn/rng.js" as MyRng
> import "../../js/rsbn/prng4.js" as MyPrng4
> import "../../js/rsbn/base64.js" as MyBase64
>
> function doEncrypt() {
>     var rsa = new MyRsa.RSAKey();
>     rsa.setPublic(dataServer.modulusHex(), "10001")
>     console.log("5.12 OK")
>     var res = rsa.encrypt(pwText.text)
>     console.log("5.12 freeze")
>     if(res) {
>     return MyRsa.linebrk(res, 64)
>     } else {
>     return ""
>     }
> }
>
> in 5.10.1 or 5.11.2 this is working fine
>
> in 5.12 Beta 3 it freezes as soon as calling rsa.encrypt()
>
> any idea what could be different in 5.12 ?
>
> thx
>
> ekke
>
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest