简体   繁体   English

Oracle Java存储过程的性能

[英]Oracle java stored procedure performance

I am trying to create Java class in Oracle 11g drawing binary data passed as BLOB with awt graphics. 我正在尝试在Oracle 11g中创建Java类,以二进制图形形式通过awt图形通过BLOB传递二进制数据。 The class loaded as a Java source 该类作为Java源加载

> create or replace and compile java source...

successfully. 成功。 When I tried to run it I faced with terrible performace. 当我尝试运行它时,我面临着糟糕的表现。 It works but ~25 times slower than same code on my PC. 它可以工作,但比我的PC上的相同代码慢25倍。 When I tried to catch the bottleneck I got that all data convertation and math operations proceed in almost same time as local runned but the drawing procedures such as 当我试图抓住瓶颈时,我发现所有数据转换和数学运算几乎都在本地运行的同时进行,但是绘制过程如

g.drawLine(x, y, x, y)

have going much slower (up to 5 seconds per pixel). 速度要慢得多(每个像素最多5秒)。 I presume it can be fixed with setting right compiler options and recompiling class. 我想可以通过设置正确的编译器选项和重新编译类来修复它。 How can I resolve this issue? 我该如何解决这个问题?

Maybe this will be useful for someone. 也许这对某人有用。

In my case problem was solved by generating BufferedImage pixel by pixel with it's setRGB() method. 在我的情况下,问题是通过使用setRGB()方法逐像素生成BufferedImage来解决的。 I just needed to generate image of big matrix of float so it matched me so well. 我只需要生成大浮点矩阵的图像即可,因此非常匹配我。 Performance is great. 表现很棒。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM