[pcre-dev] [Bug 1243] enabling JIT on jailbroken iOS devices

Top Page
Delete this message
Author: YllierDev
Date:  
To: pcre-dev
Subject: [pcre-dev] [Bug 1243] enabling JIT on jailbroken iOS devices
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1243

YllierDev <ruediger.rill@???> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ruediger.rill@???





--- Comment #3 from YllierDev <ruediger.rill@???> 2012-05-02 08:04:39 ---
You're welcome. I just wanted to see if it would be possible and it is. At
least on JAILBROKEN devices. I haven't tried it in an untampered iOS
environment yet, but I will.

Back in iOS 4.3 Apple introduced JIT for Mobile Safari's JavaScript engine, so
since then it is possible, but I think only for jailbroken devices it can be
done in any process; there the kernel is being patched to allow a bit more
freedom...

Some time ago I developed a small AdBlocker library in C/objC, which hooks a
function in WebKit to examine the request before it is being send. I'm
injecting it into MobileSafari and other applications which are using WebKit
(or better UIWebView).

And even though the regexes are relatively short, I can see a speed improvement
of about 20% when JTI is enabled (measured). When querying the regexes and
pcre_extras I'm getting valid integers for PCRE_INFO_JITSIZE (usally between
1.2k and 2.5k) and of course an 1 for PCRE_INFO_JIT. It's not the perfect
environment for this cool feature but good enough to test it.


I'll investigate the situation in the next days and I'll submit a patch once
I'm sure about about how to handle these special cases.

Best,

Yllier




--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email