How to disable volatile buffer in an unsigned applet?

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

How to disable volatile buffer in an unsigned applet?

Piotr Kołaczkowski-2
Hi,

The volatile buffer rendering used by default in Pivot makes performance
of my application *terrible* on Linux. On the other hand, it makes no
difference on Windows.
So I wanted to switch it off.

In a standalone mode, I can put a
System.setProperty("org.apache.pivot.wtk.disablevolatilebuffer", "true")
early in the main and it works fine.
However, I'm struggling how to achieve the same for the applet.
Calling System.setProperty in the constructor of my wtk.Application
class is probably too late - no effect.
And when I put it into my JNLP descriptor like this:

<jnlp ...>
<information>
   ...
</information>
<resources>
<j2se version="1.6+"></j2se>
<property value="true" name="jnlp.packEnabled"></property>
<property name="jnlp.concurrentDownloads" value="1"/>
<property name="org.apache.pivot.wtk.disablevolatilebuffer" value="true"/>
<jar ... />
<jar ... />
</resources>
   ...
</jnlp>

the only thing I get is a SecurityException telling me it cannot read
the org.apache.pivot.wtk.disablevolatilebuffer property.

So, how should I do it?

Regards,
Piotr

Reply | Threaded
Open this post in threaded view
|

Re: How to disable volatile buffer in an unsigned applet?

Sandro Martini
Hi Piotr,
all his is interesting (to fix) and need to put some time on it ...
I'm sorry but these weeks I'm busy preparing the 2.0.1 release.

Just after this I can look at it better, and say something to you.

Only a small question in the meantime: under Linux, are you using
OpenJDK and/or Sun/Oracle JDK/JRE ?
So I can setup an environment like yours (but inside VM I don't know
if hardware acceleration is properly emulated).


And don't worry, for a next maintenance (2.0.2) release we will be
much more fast ...


Thank you for now.

Bye,
Sandro
Reply | Threaded
Open this post in threaded view
|

Re: How to disable volatile buffer in an unsigned applet?

Piotr Kołaczkowski-2
W dniu 31.12.2011 16:34, Sandro Martini pisze:

> Hi Piotr,
> all his is interesting (to fix) and need to put some time on it ...
> I'm sorry but these weeks I'm busy preparing the 2.0.1 release.
>
> Just after this I can look at it better, and say something to you.
>
> Only a small question in the meantime: under Linux, are you using
> OpenJDK and/or Sun/Oracle JDK/JRE ?
> So I can setup an environment like yours (but inside VM I don't know
> if hardware acceleration is properly emulated).


Oracle JDK 1.6.0 update 27, 64-bit.
On Linux it reports hardware acceleration for VolatileImage on, and
performance is poor.
On Windows it reports hardware acceleration off, and performance is ok.

>
>
> And don't worry, for a next maintenance (2.0.2) release we will be
> much more fast ...
>

Cool. But are you going to release it before the end of 2012?

Reply | Threaded
Open this post in threaded view
|

Re: How to disable volatile buffer in an unsigned applet?

Sandro Martini


> Oracle JDK 1.6.0 update 27, 64-bit.
> On Linux it reports hardware acceleration for VolatileImage on, and performance is poor.
> On Windows it reports hardware acceleration off, and performance is ok.

On Linux could be due to Java, or the graphics driver, but we can look if there is something in our code to improve this.

>> And don't worry, for a next maintenance (2.0.2) release we will be much more fast ...
>
> Cool. But are you going to release it before the end of 2012?

For sure ... but for a better speed you can even join us as a committer, I'll be happy to give you more info, if you are really interested.

Sandro

Reply | Threaded
Open this post in threaded view
|

Re: How to disable volatile buffer in an unsigned applet?

Sandro Martini
In reply to this post by Piotr Kołaczkowski-2
Hi all,
I've just seen that Noel just committed the patch/fix for this ...
Piotr, can you try with latest trunk (at least in youe case, using Web
Start) so we can ensure this is resolved ?
I'll create a JIRA issue for this so we can assign (and resolve) for 2.0.2 .

Thank you very much for now.

Tell to us.

Bye,
Sandro


2011/12/30 Piotr Kołaczkowski <[hidden email]>:

> Hi,
>
> The volatile buffer rendering used by default in Pivot makes performance of
> my application *terrible* on Linux. On the other hand, it makes no
> difference on Windows.
> So I wanted to switch it off.
>
> In a standalone mode, I can put a
> System.setProperty("org.apache.pivot.wtk.disablevolatilebuffer", "true")
> early in the main and it works fine.
> However, I'm struggling how to achieve the same for the applet.
> Calling System.setProperty in the constructor of my wtk.Application class is
> probably too late - no effect.
> And when I put it into my JNLP descriptor like this:
>
> <jnlp ...>
> <information>
>  ...
> </information>
> <resources>
> <j2se version="1.6+"></j2se>
> <property value="true" name="jnlp.packEnabled"></property>
> <property name="jnlp.concurrentDownloads" value="1"/>
> <property name="org.apache.pivot.wtk.disablevolatilebuffer" value="true"/>
> <jar ... />
> <jar ... />
> </resources>
>  ...
> </jnlp>
>
> the only thing I get is a SecurityException telling me it cannot read the
> org.apache.pivot.wtk.disablevolatilebuffer property.
>
> So, how should I do it?
>
> Regards,
> Piotr
>
Reply | Threaded
Open this post in threaded view
|

Re: How to disable volatile buffer in an unsigned applet?

Piotr Kołaczkowski-4
Oh, yeah, he committed the patch I have just sent him, right? :D

2012/3/15 Sandro Martini <[hidden email]>:

> Hi all,
> I've just seen that Noel just committed the patch/fix for this ...
> Piotr, can you try with latest trunk (at least in youe case, using Web
> Start) so we can ensure this is resolved ?
> I'll create a JIRA issue for this so we can assign (and resolve) for 2.0.2 .
>
> Thank you very much for now.
>
> Tell to us.
>
> Bye,
> Sandro
>
>
> 2011/12/30 Piotr Kołaczkowski <[hidden email]>:
>> Hi,
>>
>> The volatile buffer rendering used by default in Pivot makes performance of
>> my application *terrible* on Linux. On the other hand, it makes no
>> difference on Windows.
>> So I wanted to switch it off.
>>
>> In a standalone mode, I can put a
>> System.setProperty("org.apache.pivot.wtk.disablevolatilebuffer", "true")
>> early in the main and it works fine.
>> However, I'm struggling how to achieve the same for the applet.
>> Calling System.setProperty in the constructor of my wtk.Application class is
>> probably too late - no effect.
>> And when I put it into my JNLP descriptor like this:
>>
>> <jnlp ...>
>> <information>
>>  ...
>> </information>
>> <resources>
>> <j2se version="1.6+"></j2se>
>> <property value="true" name="jnlp.packEnabled"></property>
>> <property name="jnlp.concurrentDownloads" value="1"/>
>> <property name="org.apache.pivot.wtk.disablevolatilebuffer" value="true"/>
>> <jar ... />
>> <jar ... />
>> </resources>
>>  ...
>> </jnlp>
>>
>> the only thing I get is a SecurityException telling me it cannot read the
>> org.apache.pivot.wtk.disablevolatilebuffer property.
>>
>> So, how should I do it?
>>
>> Regards,
>> Piotr
>>
Reply | Threaded
Open this post in threaded view
|

Re: How to disable volatile buffer in an unsigned applet?

Noel Grandin-2

Yes, thanks to Piotr for this patch.

On 2012-03-15 11:50, Piotr Kołaczkowski wrote:
> Oh, yeah, he committed the patch I have just sent him, right? :D
>
>
Reply | Threaded
Open this post in threaded view
|

Re: How to disable volatile buffer in an unsigned applet?

Sandro Martini
In reply to this post by Piotr Kołaczkowski-4
Hi Piotr,

> Oh, yeah, he committed the patch I have just sent him, right? :D
Yes (I think) :-) ...

Just created the issue:
https://issues.apache.org/jira/browse/PIVOT-842

Tell me (after some tests, don't worry, we have time) so I can mark it
as resolved.

Bye,
Sandro