RFC - Reduce loading of PropertiesFile
Jiri Vanek
jvanek at redhat.com
Fri Apr 20 05:00:35 PDT 2012
On 04/19/2012 09:14 PM, Thomas Meyer wrote:
>
> patch1.diff
>
>
> # HG changeset patch
> # User Thomas Meyer<thomas at m3y3r.de>
> # Date 1334859522 -7200
> # Node ID e750944c8d66bbab0801e7490303eef26b689df3
> # Parent 4a35862de3fc26a9e1cdfb66fd7b6c750f18371b
> Enable JNLPRuntime class to run in headless mode
>
> diff -r 4a35862de3fc -r e750944c8d66 netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java
> --- a/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java Thu Apr 19 20:02:40 2012 +0200
> +++ b/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java Thu Apr 19 20:18:42 2012 +0200
> @@ -199,12 +199,14 @@
> ServiceManager.setServiceManagerStub(new XServiceManagerStub()); // ignored if we're running under Web Start
>
> policy = new JNLPPolicy();
> - security = new JNLPSecurityManager(); // side effect: create JWindow
> -
> - try {
> - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
> - } catch (Exception e) {
> - // ignore it
> + if (!headless) {
> + security = new JNLPSecurityManager(); // side effect: create JWindow
> +
> + try {
> + UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
> + } catch (Exception e) {
> + // ignore it
> + }
> }
>
> doMainAppContextHacks();
>
>
hmhm. This looks un-relevant to original issue. What is motivation? Can you poist it in new patch?
> patch2.diff
>
>
> # HG changeset patch
> # User Thomas Meyer<thomas at m3y3r.de>
> # Date 1334861615 -7200
> # Node ID b814c44a1613b27f478adfbaed9c2ed1be43ba51
> # Parent e750944c8d66bbab0801e7490303eef26b689df3
> Add unit test for CacheLRUWrapper.load() optimisation
>
> diff -r e750944c8d66 -r b814c44a1613 tests/netx/unit/net/sourceforge/jnlp/cache/CacheLRUWrapperTest.java
> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
> +++ b/tests/netx/unit/net/sourceforge/jnlp/cache/CacheLRUWrapperTest.java Thu Apr 19 20:53:35 2012 +0200
...
> +
> + // wait more than 100ms for noLoops = 1000 and noEntries=1000 is bad
> + assertTrue(avg< 100 * 1000);
Please add explanation string
Something like
assertTrue("recently_used file must be loaded under 100000ns, was in "+avg,avg< 100 * 1000);
> +
> + clw.unlock();
> + }
> +
> +}
>
Thanx again!
More information about the distro-pkg-dev
mailing list