Image loading bad performance!!!!
I have a background image on a Jpanel and i have added some buttons on the JPanel. The problem is when I start my application, the buttons are visible about 5 secondes before my background image. So, how can I improve my dowloading performance of my background image...
thanks all.....
Yannick
How do you add the background image? Do you have a custom component? If you do, then use the ImageObserver interface.
Similar Messages
-
My firefox is loading Bad quality images, but actully the images are perfectly alright
My firefox is loading Bad quality images, but actully the images are perfectly alright
In my experience, print quality settings such as dpi/ppi are hidden in your printer driver settings and not directly available through Firefox's UI. In the print dialog, if you click the Properties button, you hopefully will gain access to this setting. Obviously native web resolution (96ppi) can give disappointing results, so hopefully you can find a place to increase it.
-
Problems with image loader 'swissarmy.js' in 7.0.1
My Javascript image loader 'swissarmy.js' at www.sustainableaggregates.com loads images right justified in 7.0.1, in older versions of Firefox or all other current browsers it's OK.
Is this a bug in Firefox 7.0.1 rendering engine or is it down to a bad piece of Javascript. Swissarmy.js is used a lot in many websites.
Will a future imminent FF upgrade cure this or do I need to source a new image loader script?My Javascript image loader 'swissarmy.js' at www.sustainableaggregates.com loads images right justified in 7.0.1, in older versions of Firefox or all other current browsers it's OK.
Is this a bug in Firefox 7.0.1 rendering engine or is it down to a bad piece of Javascript. Swissarmy.js is used a lot in many websites.
Will a future imminent FF upgrade cure this or do I need to source a new image loader script? -
Issue with Image Loader in 14.0
Hi All,
In our application, we have a custom function module in ECC, which is passing the URL of an image uploaded on the content management server(KPRO). Custom FM calls 'SDOK_PHIO_GET_URL_FOR_GET' to get the URL of the image.
When we execute the FM in ECC, we get the URL as:
http://gbswidkprodb01.global.rexam.net:81/ContentServer/ContentServer.dll?get&pVersion=0046&contRep=YA&docId=001F296E9EB61ED3B6F490000438C20C&compId=TJ12A.jpg&accessMode=r&authId=CN%3DBC3,OU%3DI0520020335,OU%3DSAPWebAS,O%3DSAPTrustCommunity,C%3DDE&expirat
when I use this URL in the browser the image gets loaded in browser.
When I capture the output of JCO call in write file URL returned from FM is:
http://<server>:81/ContentServer/ContentServer.dll?get&pVersion=0046&contRep=YA&docId=001F296E9EB61ED3B6F490000438C20C&compId=TJ12A.jpg&accessMode=r&authId=CN%3DBC3,OU%3DI0520020335,OU%3DSAPWebAS,O%3DSAPTrustCommunity,C%3DDE&expiration=20140617181313&secKey=MIIBUgYJKoZIhvcNAQcCoIIBQzCCAT8CAQExCzAJBgUrDgMCGgUAMAsGCSqGSIb3DQEHATGCAR4wggEaAgEBMG8wZDELMAkGA1UEBhMCREUxHDAaBgNVBAoTE1NBUCBUcnVzdCBDb21tdW5pdHkxEzARBgNVBAsTClNBUCBXZWIgQVMxFDASBgNVBAsTC0kwNTIwMDIwMzM1MQwwCgYDVQQDEwNCQzMCByASCCcTUiEwCQYFKw4DAhoFAKBdMBgGCSqGSIb3DQEJAzELBgkqhkiG9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTE0MDYxNzE2MTMxM1owIwYJKoZIhvcNAQkEMRYEFM%2FKd4MzWL0y1KfF58AHNg9PYqOlMAkGByqGSM44BAMELzAtAhUAtqASnXbD3E2ZM8EhG%2FLxgJhKCs0CFH0qFlBxzWlzS8kjeFw3kad63SHW
when I use this URL in the browser I get 'HTTP 400' error.
Using either of the two URL's in the image loader I get the error:
[WARN] [ImageLoader_0]ImageLoader_0 Status: 400 - (bad request)
We are currently on SAP MII 14.0 SP05(patch 3).
Thanks in advance for your help.
Regards,
DarshanSam,
I tried logging in to ECC with the same user as the one that is making the Jco connection and it is giving the same URL which i was getting earlier when i was executing the FM with my user id. I am testing the FM through SE37.
There is no logic in the custom BAPI to replace the <server> keyword. Based on the image name, it gives the URL of where the image is stored on the KPRO server.
Could not find URL Decode function in the MII link editor, i believe it is the decode function which you are referring to. Even that is not working. If it is something other than this, do let me know.
PS: This works fine in the 11.5 system from which we have upgraded to 14.0.
regards,
darshan -
No Action Until Image Loads, Please
Hi;
For some reason the squares of color that are supposed to load behind the image that acts as a mask load first, momentarily showing while the image loads, which looks bad. Hre is the code:
package
import flash.display.Sprite;
import flash.text.TextLineMetrics;
import flash.text.TextField;
import flash.text.TextFormat;
import flash.text.TextFormatAlign;
import flash.text.TextFieldAutoSize;
import flash.net.navigateToURL;
import flash.display.Bitmap;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.display.MovieClip;
import com.greensock.*;
import com.greensock.easing.*;
import flash.display.Loader;
import flash.events.ProgressEvent;
import flash.text.TextField;
import flash.text.TextFormat;
import flash.text.TextFieldAutoSize;
import flash.net.URLRequest;
import Images;
import flash.display.SpreadMethod;
[SWF(backgroundColor="0x505050")]
public class BillsBBQPreloader extends MovieClip
var loader:Loader = new Loader();
var loader2:Loader = new Loader();
var loader3:Loader = new Loader();
var loader4:Loader = new Loader();
var loader5:Loader = new Loader();
private var myTextField:TextField = new TextField();
var imgFlag1:Boolean = new Boolean(false);
var imgFlag2:Boolean = new Boolean(false);
var imgFlag3:Boolean = new Boolean(false);
var imgFlag4:Boolean = new Boolean(false);
var imgFlag5:Boolean = new Boolean(false);
var thermometer:Images = new Images();
var thermometerMask:Images = new Images();
var mask_container:Sprite = new Sprite();
var square:Sprite = new Sprite();
public function BillsBBQPreloader()
addEventListener(Event.ADDED_TO_STAGE, init, false, 0, true);
private function init(e:Event)
// addChild(mask_container);
// mask_container.addChild(thermometerMask);
addChild(square);
AddThermometer();
private function AddText():void
var clientName:TextField = new TextField();
var format:TextFormat = new TextFormat();
format.font = 'Arial';
format.size = 35;
clientName.textColor = 0x023048;
clientName.text = "Bill's Texas Pit BBQ";
clientName.autoSize = TextFieldAutoSize.LEFT;
clientName.setTextFormat(format);
var nameSprite:Sprite = new Sprite();
nameSprite.x = stage.stageWidth/2 - 150;
nameSprite.y = 10;
nameSprite.alpha = 0;
TweenLite.to(nameSprite, 2, {alpha:1});
addChild(nameSprite);
nameSprite.addChild(clientName);
AddWhite();
private function AddThermometerMask():void
thermometerMask.ImagesArray = ["images/thermometer-mask.png", "index.py", 144, 1152, (stage.stageWidth-144)/2, 23];
AddRed();
private function AddWhite():void
square.graphics.beginFill(0xffffff);
square.graphics.moveTo(0,0);
square.graphics.lineTo(100,0);
square.graphics.lineTo(100,504);
square.graphics.lineTo(0,504);
square.graphics.endFill();
square.x = (stage.stageWidth-100)/2;
square.y = ((stage.stageHeight+458)/2)-83;
AddRed();
private function AddRed():void
// square.mask = mask_container;
square.graphics.beginFill(0xff0000);
square.graphics.moveTo(0,0);
square.graphics.lineTo(75,0);
square.graphics.lineTo(75,504);
square.graphics.lineTo(0,504);
square.graphics.endFill();
square.x = (stage.stageWidth-74)/2;
square.y = ((stage.stageHeight+458)/2)-83;
AddLoaders();
private function AddThermometer():void
thermometer.ImagesArray = ["images/thermometer-mask.png", "index.py", 144, 1152, (stage.stageWidth-144)/2, (stage.stageHeight-458)/2];
addChild(thermometer);
// AddThermometerMask();
AddText();
private function AddLoaders():void
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded);
loader.load(new URLRequest("images/logo_w_fire.png"));
loader2.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loop);
loader2.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded2);
loader2.load(new URLRequest("images/tpwebbaseline.jpg"));
loader3.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded3);
loader3.load(new URLRequest("images/tpdplatebgwflame.jpg"));
removeEventListener(Event.ADDED_TO_STAGE, init);
addChild(myTextField);
myTextField.width = 250;
myTextField.x = (stage.stageWidth-50)/2;
myTextField.y = 470;
myTextField.selectable = false;
myTextField.border = false;
myTextField.borderColor = 0xAA0000;
myTextField.autoSize = TextFieldAutoSize.LEFT;
var myFormat:TextFormat = new TextFormat();
myFormat.color = 0x023048;
myFormat.size = 24;
myFormat.italic = true;
myTextField.defaultTextFormat = myFormat;
private function imageLoaded(event:Event):void
imgFlag1 = true;
if (imgFlag2 == true && imgFlag3 == true)
completePreloader();
private function imageLoaded2(event:Event):void
imgFlag2 = true;
if (imgFlag1 == true && imgFlag3 == true)
completePreloader();
private function imageLoaded3(event:Event):void
imgFlag3 = true;
if (imgFlag1 == true && imgFlag2 == true)
completePreloader();
function completePreloader()
var req:URLRequest = new URLRequest('index.py');
navigateToURL(req, '_self');
function loop(e:ProgressEvent):void
var perc:Number = e.bytesLoaded/e.bytesTotal;
myTextField.text = Math.ceil(perc*100).toString() + "%";
var myY:Number = ((stage.stageHeight+458)/2)-83-(3.75*perc*100)
square.y = myY;
Here's the code for Images()
package {
import flash.display.MovieClip;
import flash.display.Sprite;
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.filters.*;
import flash.filters.BitmapFilterQuality;
import flash.net.URLRequest;
import flash.net.URLLoader;
import flash.display.Loader;
import flash.display.LoaderInfo;
import flash.display.DisplayObject;
import flash.events.Event;
import flash.events.IOErrorEvent;
public class Images extends MovieClip
private var parent_container:Sprite = new Sprite();
private var _path:String = new String("path");
private var _myWidth:Number = new Number(20);
private var _myHeight:Number = new Number(20);
private var _myX:Number = new Number(20);
private var _myY:Number = new Number(20);
private var _myURL:String = new String("url");
public function Images():void
public function set ImagesArray(_imagesArray:Array):void
_path = _imagesArray[0];
_myURL = _imagesArray[1];
_myWidth = _imagesArray[2];
_myHeight = _imagesArray[3];
_myX = _imagesArray[4];
_myY = _imagesArray[5];
LoadImage();
function LoadImage():void
parent_container = new Sprite();
addChild(parent_container)
var req:URLRequest = new URLRequest(_path);
var loader:Loader = new Loader();
loader.load(req);
loader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, LoadedImage);
function LoadedImage(e:Event):void
var loaderInfo:LoaderInfo = e.target as LoaderInfo;
var displayObject:DisplayObject = loaderInfo.content;
displayObject.width = _myWidth;
displayObject.height = _myHeight;
parent_container.addChild(displayObject);
parent_container.x = _myX;
parent_container.y = _myY;
function ioErrorHandler(event:IOErrorEvent):void {
trace("ioErrorHandler: " + event);
I have experimented with adding the square child elsewhere (such as in the code where it is created twice), but that proves even more disastrous. Please advise.
TIA,
BenoOops. I realize now you guys showed me how to do this; namely dispatchEvent(). (This was a problem I set aside while we solved the one that addressed this issue.) Here is the revised code which accomplishes what I wanted:
package
import flash.display.Sprite;
import flash.text.TextLineMetrics;
import flash.text.TextField;
import flash.text.TextFormat;
import flash.text.TextFormatAlign;
import flash.text.TextFieldAutoSize;
import flash.net.navigateToURL;
import flash.display.Bitmap;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.display.MovieClip;
import com.greensock.*;
import com.greensock.easing.*;
import flash.display.Loader;
import flash.events.ProgressEvent;
import flash.text.TextField;
import flash.text.TextFormat;
import flash.text.TextFieldAutoSize;
import flash.net.URLRequest;
import Images;
import flash.display.SpreadMethod;
[SWF(backgroundColor="0x505050")]
public class BillsBBQPreloader extends MovieClip
var loader:Loader = new Loader();
var loader2:Loader = new Loader();
var loader3:Loader = new Loader();
var loader4:Loader = new Loader();
var loader5:Loader = new Loader();
private var myTextField:TextField = new TextField();
var imgFlag1:Boolean = new Boolean(false);
var imgFlag2:Boolean = new Boolean(false);
var imgFlag3:Boolean = new Boolean(false);
var imgFlag4:Boolean = new Boolean(false);
var imgFlag5:Boolean = new Boolean(false);
var thermometer:Images = new Images();
var thermometerMask:Images = new Images();
var mask_container:Sprite = new Sprite();
var square:Sprite = new Sprite();
public function BillsBBQPreloader()
addEventListener(Event.ADDED_TO_STAGE, init, false, 0, true);
private function init(e:Event)
// addChild(mask_container);
// mask_container.addChild(thermometerMask);
AddThermometer();
private function AddText():void
var clientName:TextField = new TextField();
var format:TextFormat = new TextFormat();
format.font = 'Arial';
format.size = 35;
clientName.textColor = 0x023048;
clientName.text = "Bill's Texas Pit BBQ";
clientName.autoSize = TextFieldAutoSize.LEFT;
clientName.setTextFormat(format);
var nameSprite:Sprite = new Sprite();
nameSprite.x = stage.stageWidth/2 - 150;
nameSprite.y = 10;
nameSprite.alpha = 0;
TweenLite.to(nameSprite, 2, {alpha:1});
addChild(nameSprite);
nameSprite.addChild(clientName);
AddWhite();
private function AddThermometerMask():void
thermometerMask.ImagesArray = ["images/thermometer-mask.png", "index.py", 144, 1152, (stage.stageWidth-144)/2, 23];
AddRed();
private function AddWhite():void
square.graphics.beginFill(0xffffff);
square.graphics.moveTo(0,0);
square.graphics.lineTo(100,0);
square.graphics.lineTo(100,504);
square.graphics.lineTo(0,504);
square.graphics.endFill();
square.x = (stage.stageWidth-100)/2;
square.y = ((stage.stageHeight+458)/2)-83;
AddRed();
private function AddRed():void
// square.mask = mask_container;
square.graphics.beginFill(0xff0000);
square.graphics.moveTo(0,0);
square.graphics.lineTo(75,0);
square.graphics.lineTo(75,504);
square.graphics.lineTo(0,504);
square.graphics.endFill();
square.x = (stage.stageWidth-74)/2;
square.y = ((stage.stageHeight+458)/2)-83;
AddLoaders();
private function AddThermometer():void
thermometer.ImagesArray = ["images/thermometer-mask.png", "index.py", 144, 1152, (stage.stageWidth-144)/2, (stage.stageHeight-458)/2];
thermometer.addEventListener("loadcomplete", AddToStage);
private function AddToStage(e:Event):void
addChild(square);
addChild(thermometer);
AddText();
private function AddLoaders():void
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded);
loader.load(new URLRequest("images/logo_w_fire.png"));
loader2.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loop);
loader2.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded2);
loader2.load(new URLRequest("images/tpwebbaseline.jpg"));
loader3.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded3);
loader3.load(new URLRequest("images/tpdplatebgwflame.jpg"));
removeEventListener(Event.ADDED_TO_STAGE, init);
addChild(myTextField);
myTextField.width = 250;
myTextField.x = (stage.stageWidth-50)/2;
myTextField.y = 470;
myTextField.selectable = false;
myTextField.border = false;
myTextField.borderColor = 0xAA0000;
myTextField.autoSize = TextFieldAutoSize.LEFT;
var myFormat:TextFormat = new TextFormat();
myFormat.color = 0x023048;
myFormat.size = 24;
myFormat.italic = true;
myTextField.defaultTextFormat = myFormat;
private function imageLoaded(event:Event):void
imgFlag1 = true;
if (imgFlag2 == true && imgFlag3 == true)
completePreloader();
private function imageLoaded2(event:Event):void
imgFlag2 = true;
if (imgFlag1 == true && imgFlag3 == true)
completePreloader();
private function imageLoaded3(event:Event):void
imgFlag3 = true;
if (imgFlag1 == true && imgFlag2 == true)
completePreloader();
function completePreloader()
var req:URLRequest = new URLRequest('index.py');
navigateToURL(req, '_self');
function loop(e:ProgressEvent):void
var perc:Number = e.bytesLoaded/e.bytesTotal;
myTextField.text = Math.ceil(perc*100).toString() + "%";
var myY:Number = ((stage.stageHeight+458)/2)-83-(3.75*perc*100)
square.y = myY;
package {
import flash.display.MovieClip;
import flash.display.Sprite;
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.filters.*;
import flash.filters.BitmapFilterQuality;
import flash.net.URLRequest;
import flash.net.URLLoader;
import flash.display.Loader;
import flash.display.LoaderInfo;
import flash.display.DisplayObject;
import flash.events.Event;
import flash.events.IOErrorEvent;
public class Images extends MovieClip
private var parent_container:Sprite = new Sprite();
private var _path:String = new String("path");
private var _myWidth:Number = new Number(20);
private var _myHeight:Number = new Number(20);
private var _myX:Number = new Number(20);
private var _myY:Number = new Number(20);
private var _myURL:String = new String("url");
public function Images():void
public function set ImagesArray(_imagesArray:Array):void
_path = _imagesArray[0];
_myURL = _imagesArray[1];
_myWidth = _imagesArray[2];
_myHeight = _imagesArray[3];
_myX = _imagesArray[4];
_myY = _imagesArray[5];
LoadImage();
function LoadImage():void
parent_container = new Sprite();
addChild(parent_container)
var req:URLRequest = new URLRequest(_path);
var loader:Loader = new Loader();
loader.load(req);
loader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, LoadedImage);
function LoadedImage(e:Event):void
var loaderInfo:LoaderInfo = e.target as LoaderInfo;
var displayObject:DisplayObject = loaderInfo.content;
displayObject.width = _myWidth;
displayObject.height = _myHeight;
parent_container.addChild(displayObject);
parent_container.x = _myX;
parent_container.y = _myY;
dispatchEvent(new Event("loadcomplete"));
function ioErrorHandler(event:IOErrorEvent):void {
trace("ioErrorHandler: " + event);
Thanks,
Beno -
How to solve bad performance in vi server
I'm useing vi server in a recursively programming structure in labview 7.1.
I have very bad performance result so i made a test comparing the speed of che various vi server call and the native.
my tests are:
normal calling.
vi server calling by reference node
vi server calling by invoke node
for each vi server calling type i tried:
unique reference calling
different reference calling
different reference, preloaded, calling
the only 1 case i found a loosing of performace acceptable 24% respect the normal calling: vi server calling by reference node with unique reference.
unfortunately this kind of calling is able to catch come kind of recunsion an forbidden it and this calling wait all the time the end of the execution of the vi called.
All the oter kinds of caling have very bad performance: from 90% to 99,9% LESS then the normal calling (10 to 1000 times more in execution time).
In addition there is a prblem in invoke colling: if you execute a invoke node with wait until done true, the mouse pointer fliks with the busy icone. that heppens in all the possible configuration.
I would like ti know if someuone as some solution to this performance problem and if Labview 8.0 fixs this problems.
Best regarda.
ing. Luca BenvegnùHi Luca,
I've made some researches for you and, what can I say is that there is a certain number of requests about "vi server performances". There are some things that are in general suggested in this situation:
1) Be "minimalist" about the use of images, graph,... And avoid Large data structures: wiring large structures into/out-of sub-VI's can take time: pass the smallest amount of data.
2) Avoid repeated calls. Calling the sub-VI's frequently, in a loop for example, create a call over-head that could be an issue. For the same reason put the "wait until" function with a specification of time in order to run loops only as often as strictly required.
However, about your question of fixing the problem with LabVIEW 8.0, I suggest you to download the Evaluation Version of LabVIEW 8.2 and try by yourself if performances are better.
I hope I've been of some help.
carlo> -
Question about image loading problem
Dear Java Gurus,
I am writing a simple Java Applet application. Basically what it does is every 3 seconds, it tries to get an image from a server and display it (also based on the browser�s client size to do some resize of the image to fit the width of the browser�s client area). But frequently I got this kind of exceptions:
----------------------------- Exception 1 --------------------------------------
Uncaught error fetching image:
java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at sun.awt.image.PNGFilterInputStream.read(Unknown Source)
at java.util.zip.InflaterInputStream.fill(Unknown Source)
at java.util.zip.InflaterInputStream.read(Unknown Source)
at java.io.BufferedInputStream.fill(Unknown Source)
at java.io.BufferedInputStream.read1(Unknown Source)
at java.io.BufferedInputStream.read(Unknown Source)
at sun.awt.image.PNGImageDecoder.produceImage(Unknown Source)
at sun.awt.image.InputStreamImageSource.doFetch(Unknown Source)
at sun.awt.image.ImageFetcher.fetchloop(Unknown Source)
at sun.awt.image.ImageFetcher.run(Unknown Source)
----------------------------- Exception 2 ------------------------------------------
sun.awt.image.PNGImageDecoder$PNGException: crc corruption
at sun.awt.image.PNGImageDecoder.getChunk(Unknown Source)
at sun.awt.image.PNGImageDecoder.getData(Unknown Source)
at sun.awt.image.PNGFilterInputStream.read(Unknown Source)
at java.util.zip.InflaterInputStream.fill(Unknown Source)
at java.util.zip.InflaterInputStream.read(Unknown Source)
at java.io.BufferedInputStream.fill(Unknown Source)
at java.io.BufferedInputStream.read1(Unknown Source)
at java.io.BufferedInputStream.read(Unknown Source)
at sun.awt.image.PNGImageDecoder.produceImage(Unknown Source)
at sun.awt.image.InputStreamImageSource.doFetch(Unknown Source)
at sun.awt.image.ImageFetcher.fetchloop(Unknown Source)
at sun.awt.image.ImageFetcher.run(Unknown Source)
Which will cause the image goes to blank in the browser and also degreed down the performance, and I do not know where they are coming from. I tried to put try-catch blocks at possible method calls, but still it does not catch these kind exceptions.
---------------------------- My Source Code ----------------------------
import java.io.*;
import java.awt.*;
import java.net.*;
import java.util.*;
import java.applet.*;
import javax.swing.*;
import java.awt.event.*;
// This is for Popup Menu
class PopupListener extends MouseAdapter
JPopupMenu popup;
PopupListener(JPopupMenu popupMenu)
popup = popupMenu;
public void mousePressed(MouseEvent e)
maybeShowPopup(e);
public void mouseClicked(MouseEvent e)
maybeShowPopup(e);
public void mouseReleased(MouseEvent e)
maybeShowPopup(e);
private void maybeShowPopup(MouseEvent e)
if (e.isPopupTrigger())
popup.show(e.getComponent(), e.getX(), e.getY());
// Image Component who contains the image and will be hosted in the ScrollPane
class ImageComponent extends JComponent
Image onscrImage;
Dimension comSize;
ImageComponent(Image image)
onscrImage = image;
setDoubleBuffered(true);
comSize = new Dimension(onscrImage.getWidth(null), onscrImage.getHeight(null));
setSize(comSize);
public synchronized void paint(Graphics g)
super.paint(g);
g.drawImage(onscrImage, 0, 0, this);
public Dimension getPreferredSize()
return comSize;
// Update the image with new image
public void setImage(Image img)
onscrImage = img;
comSize = new Dimension(onscrImage.getWidth(null), onscrImage.getHeight(null));
setSize(comSize);
// The main Applet hosted in the browser
public class MWRemotingApplet extends JApplet
//Media Tracker to manage the Image loading
MediaTracker medTracker;
Image my_Image;
// ScollPane who contains the image component
JScrollPane scrollPane;
ImageComponent imgComp;
// The applet base URL and image filename passed from htm who hosted the Applet
URL base;
String filename;
// Schedules getting the image
private java.util.Timer timer;
private int delay = 3000;
private boolean bFitToBrowser = false;
private int iVScrollbarWidth = 20;
// Popup Menu
JPopupMenu jPopupMenu;
JMenuItem popupMenuItem;
public void init()
// Set the layout to GridLayout then the it can fill in the Applet
setLayout(new GridLayout());
try
// getDocumentbase gets the applet path.
base = getCodeBase();
// Get the image file name from the parameter
filename = getParameter("filename");
catch (Exception e)
JOptionPane.showMessageDialog(null, "Failed to get the path and filename of the image!", "Message", 0);
return;
// Create the Media Tracker
medTracker = new MediaTracker(this);
// Download the image from the remote server
// If the image width is greater than the width of the current browser client area
// Resize the image to fit the width
// This is because for some reason, this will lead to image not refreshing
DownloadImage();
//Add the popup menu
jPopupMenu = new JPopupMenu();
popupMenuItem = new JMenuItem("Fit to Browser");
popupMenuItem.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent event) {
bFitToBrowser = !bFitToBrowser;
if(bFitToBrowser)
popupMenuItem.setText("Original Size");
FitToBrowser();
else
popupMenuItem.setText("Fit to Browser");
DownloadImage();
if(my_Image != null)
imgComp.setImage(my_Image);
jPopupMenu.add(popupMenuItem);
// Create the image component
imgComp = new ImageComponent(my_Image);
//Add listener to the image component so the popup menu can come up.
MouseListener popupListener = new PopupListener(jPopupMenu);
imgComp.addMouseListener(popupListener);
// Create the scroll pane
scrollPane = new JScrollPane(imgComp);
scrollPane.setDoubleBuffered(true);
// Catch the resize event of the Applet
addComponentListener(new ComponentAdapter()
public void componentResized(ComponentEvent e)
super.componentResized(e);
if(bFitToBrowser)
FitToBrowser();
else
DownloadImage();
if(my_Image != null)
imgComp.setImage(my_Image);
//Add Components to the Applet.
add("Center", scrollPane);
validate();
// Start the timer to periodically download image
// from remote server
public void start()
timer = new java.util.Timer();
timer.schedule(new TimerTask()
//creates a timertask to schedule
// overrides the run method to provide functionality
public void run()
DownloadImage();
if(my_Image != null)
imgComp.setImage(my_Image);
, 0, delay);
public void stop()
timer.cancel(); //stops the timer
public synchronized void DownloadImage()
if(my_Image != null)
my_Image.flush();
my_Image = null;
try
my_Image = getImage(base, filename);
catch (Exception e)
my_Image = null;
return;
medTracker.addImage( my_Image, 0 );
try
medTracker.waitForAll();
if ( my_Image != null )
medTracker.removeImage(my_Image);
catch (InterruptedException e)
JOptionPane.showMessageDialog(null, "waitForAll failed while downloading the image!", "Message", 0);
catch(Exception e1)
System.out.println("Get Exception = " + e1.getMessage());
e1.printStackTrace();
if(bFitToBrowser)
FitToBrowser();
else if(my_Image.getWidth(null) > this.getSize().width)
FitToWidth();
// Resize the image to fit the browser width and height
public synchronized void FitToBrowser()
if(my_Image != null)
my_Image = my_Image.getScaledInstance(this.getSize().width - 5, this.getSize().height - 5, java.awt.Image.SCALE_SMOOTH);//java.awt.Image.SCALE_AREA_AVERAGING);//java.awt.Image.SCALE_SMOOTH);
medTracker.addImage( my_Image, 0 );
try
medTracker.waitForAll();
medTracker.removeImage(my_Image);
catch (InterruptedException e)
JOptionPane.showMessageDialog(null, "waitForAll failed!", "Message", 0);
catch (Exception e1)
System.out.println("Get Exception = " + e1.getMessage());
e1.printStackTrace();
// Resize the image to fit the browser width only
public synchronized void FitToWidth()
if(my_Image != null)
int fitHeight = (int)((this.getSize().width - iVScrollbarWidth)*(my_Image.getHeight(null)+0.0)/my_Image.getWidth(null));
my_Image = my_Image.getScaledInstance(this.getSize().width - iVScrollbarWidth, fitHeight, java.awt.Image.SCALE_SMOOTH);
medTracker.addImage( my_Image, 0 );
try
medTracker.waitForAll();
medTracker.removeImage(my_Image);
catch (InterruptedException e)
JOptionPane.showMessageDialog(null, "waitForAll failed!", "Message", 0);
catch (Exception e1)
System.out.println("Get Exception = " + e1.getMessage());
e1.printStackTrace();
}[url http://forum.java.sun.com/thread.jsp?thread=518979&forum=14]Please[url http://forum.java.sun.com/thread.jsp?thread=518977&forum=32] do[url http://forum.java.sun.com/thread.jsp?thread=518973&forum=37] not[url http://forum.java.sun.com/thread.jsp?thread=518978&forum=42] crosspost. Or [url http://forum.java.sun.com/thread.jsp?forum=7&thread=518976]double-post. Or post to the wrong forum. Or use non-sense subject.
-
Master column tree - bad performance
Hello,
I have a table with master column that uses recursive node without Load Children event. the whole table loads at startup. I Have very bad performance : every click on the little triangle takes about 6-7 seconds, and there is even no round-trip to server because all data is already at the client!
I need to show list of products by there family (50 families, each has 10 products). How can i imporve my performance (maybe server configuration or my code or another method)
I work with ep 7 sp12.
Thanks
Roni.Hi Roni,
Yes, you have to manipulate the add element on before loading the tree. Best Practice is to use onLoadChildren event. Loading the tree at once will always have performance issues.
Refer to these tutorial for creating tree using onLoadChildren event.
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/wd%20java/wd%20tutorials/constructing%20a%20recursive%20and%20loadable%20web%20dynpro%20tree.pdf">Recursive Loadable Tree</a>
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/wd%20java/wd%20tutorials/integration%20of%20a%20tree%20structure%20in%20a%20web%20dynpro%20table.pdf">Integration of Tree Structure in Table</a>
There are no limitations on this UI control, you can stay with any number of levels.
Regards
Srikanth -
Bad performance video in on vivo card?
This opinion posted as a reply in other thread. But because I think It is proper to be an issue for discussion
I am posting in a new thread. Let alone the difficulty in configuration, the vivo of this card seems to have a poor performance.
I too have a GeForce 4 Ti4200-VTD8X-8894 AGP 8X 128MB.
Vidio in working in a machine, but not in other machine.
I also have a ati tv wonder pci, The configurations of the capture driver on both machine appeares to be the same but behave differently, which I don't know why at all.
What I've found so far :
1. For tv(videoin) decoding: dscaler1.7(alpha) works on both machine(but on bad one freezes often)
2. On the bad machine using any capture driver causes pending (ie. in windows movie maker or virtual dub), drivers(1.27 or 1.22) have the same behavior.
3. While comparing the performance of tv decoding, I found a big issue. Tvwonder was very vivid on screen and the cpu usage was only 8% while vivo was very rough(skipping, ...) and the cpu load was over 60%.
So the conclusion?
The tv in of this card is only for the poor. If you can bear the poor performanc, you can spend lots of time to enable it and get bad performance. I'd rather buy a h/w decoding tv card for $30 or more. With amd xp 2.1G, and Tvwonder and window media encoder, I was able to broadcast to 1.5g bandwidth of video quality while watching the movie on Window media player on the same machine. The cpu usage was around 80%. But with this card, I cannot dream of it at all.
It is said that this card has bt848 decoder(So can be played using dscaler1.7). Then how come this card be so slow on decoding? Bad configuration? Possibly. If anyone who could watch tv(through vcr) fast enough with low cpu usage, please let me know the secret.I started again from scratch (3:th time), installed win98 on a clean HD and installed the vga driver from the cd in the box. Then I installed Winproducer from the cd, but the capture program I have to browse on the cd to install. The capture seems to work now, but I can not save my recording from my camcorder, some error message is poping up and the same message is when I tried to play the saved file (there is a saved file anyway).
I have problem whith my network card also byt only in win98, complaining about ndis.vxd (can´t load ndis.vxd).
So I have to install W2000 to get internet.
When I installed the Winproducer on W2000 the computer rebooted all the time, is Winproducer not compatible whith W2000 ??
I have not downloded anything yet (se abow).
And where can I find this 28.32 or 29.42 ?
WDM, I have installed this time.
Thanks NE -
Very bad performance of NWBC in IE11
Hello colleagues!
I've faced with a bad performance of NWBC in IE11 after update to NW7.02 SP16 GRC10 SP18. According to the pam IE 11 is supported.
When I log in and try to create an access request I get a picture with slow circle
(the message at the bottom of the window indicates that I've switched off all security settings and plug-ins)
After 1-1,5 minute I get a normal screen
If I try select an entry from any drop list or perform any other actions the window hangs with information (Not responding)
Has anyone experienced the same problem in GRC or similar products?
My search results for this issue were not successful.
I suspect that the problem is in NWBC, because webgui works fine, and hope that someone can provide with the corrections.
I've tried to use httpwatch, but it hasn't shown any useful information. I only identified that big time consumption happens when load one page (see below)
Could any one advice how to resolve the issue ?
System parameters:
SAP_BASIS 702 0016 SAPKB70216 SAP - базисная система
SAP_ABA 702 0016 SAPKA70216 Компоненты, общие для всех приложений
PI_BASIS 702 0016 SAPK-70216INPIBASIS Basis Plug-In
ST-PI 2008_1_700 0011 SAPKITLRDK SAP Solution Tools Plug-In
SAP_BW 702 0016 SAPKW70216 SAP Business Warehouse
GRCFND_A V1000 0018 SAPK-V1018INGRCFNDA GRC Foundation ABAP
ST-A/PI 01Q_700 0002 SAPKITAB7L Servicetools for other App./Netweaver 04
Regards,
Artem
P.S. notes that I have checked:
http://service.sap.com/sap/support/notes/1717650
http://service.sap.com/sap/support/notes/1674530
http://service.sap.com/sap/support/notes/1937379
http://service.sap.com/sap/support/notes/1926394
http://service.sap.com/sap/support/notes/2016738Hello Samuli!
I've implemented all corrections up to Corrections for unified rendering 702/17 VII.
Program WDG_MAINTAIN_UR_MIMES shows the following output:
Status
ZIP Archive Path in MIME Repository: /sap/public/bc/ur/ur_mimes_nw7.zip
ZIP File Prefix: mimes/
ZIP Archive Timestamp: 11.03.2015 16:37:21
ZIP Archive LOIO: 0019BBCA3D421DEDB6E50FEB0CAFEA8B
ZIP Archive Size [Bytes]: 12.879.368
Deployed ZIP Archive Timestamp: 11.03.2015 16:37:21
Deployment Timestamp: 11.03.2015 17:09:09
Number of deployed files: 8.161
Deployed version.properties:
urversion: 7.33.3.80.0
urrelease: UnifiedR_03_REL
urchangelist: 222951
urtimestamp: 201410291102
urimplementationversion: 03.000.20141028171614.0000
urspnumber: 00
ursppatchlevel: 0
urtarget: NewYork
codeline: $File: //tc1/uicore/UnifiedR_03_REL/src/_version/version/version.properties $
CLUR_NW7=>VERSION_PROPERTIES:
urversion: 7.33.3.80.0
urrelease: UnifiedR_03_REL
urchangelist: 222951
jschangelist: 223208
urtimestamp: 201410291102
urimplementationversion: 03.000.20141028171614.0000
urspnumber: 00
ursppatchlevel: 0
urtarget: NewYork
codeline: $File: //tc1/uicore/UnifiedR_03_REL/src/_version/version/version.properties $
Previously I had 7.33.3.68.0.
So, I don't know what else can do... If I roll back to Explorer 9, the problem disappears, however another user with IE9 experiences the same problem. FF works fine.
Could you give me please another idea to resolve the data?
Regards,
Artem -
CMP 6.1 Entity bad performance.
I'am using entity 1.1 EJB on WL 6.1 and facing very bad performances:
around 150ms for an insert (i have 20 columns).
When accessing an order interface to read 2 fields in a session bean method: around
90 ms.
I'am very disapointed and confused. What should I look up for
to increase the performance ? Any important tuning or parameters ? Should I use EJB
2.0 to have significant perf ?
Thanks for any advice because we are thinking to switch all the application on stored
procedures. A solution without Entity and fewer stateless session beans.
My config:
WL: 6.1 on Sun sparc
SGBD: Sybase
Entity: WebLogic 6.0.0 EJB 1.1 RDBMS (weblogic-rdbms11-persistence-600.dtd)
ThanksHistorically its hard to get good performance & scalability out of sybase
without using stored procs. Using dynamic sql on sybase just doesnt do as
well as procs. Oracle on the other hand can get very close to stored proc
speed out of well written dynamic sql.
As far as weblogic goes, my experience is the focus of their testing for db
related stuff is Oracle, then DB2, then MSSQLServer. Sybase is usually last
on the list.
As far as the 6.1 cmp, haven't used it much, but because of these other
things I would be cautious about using it with Sybase.
Joel
"Antoine Bas" <[email protected],> wrote in message
news:3cc7cdcf$[email protected]..
>
I'am using entity 1.1 EJB on WL 6.1 and facing very bad performances:
around 150ms for an insert (i have 20 columns).
When accessing an order interface to read 2 fields in a session beanmethod: around
90 ms.
I'am very disapointed and confused. What should I look up for
to increase the performance ? Any important tuning or parameters ? ShouldI use EJB
2.0 to have significant perf ?
Thanks for any advice because we are thinking to switch all theapplication on stored
procedures. A solution without Entity and fewer stateless session beans.
My config:
WL: 6.1 on Sun sparc
SGBD: Sybase
Entity: WebLogic 6.0.0 EJB 1.1 RDBMS(weblogic-rdbms11-persistence-600.dtd)
>
Thanks -
Jasper report on HTML when one image loaded from database and for the other
How to generate jasper report on HTML when one image loaded from database and for the other we give a image path
My code
ByteArrayOutputStream baos = new ByteArrayOutputStream();
exporter = new JRHtmlExporter();
exporter.setParameter(JRExporterParameter.JASPER_PRINT, print);
exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, baos);
exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI, strImageInputDirectory);
exporter.setParameter(JRHtmlExporterParameter.IMAGES_DIR_NAME, strImageOutputPath == null ? "." : strImageOutputPath);
exporter.setParameter(JRHtmlExporterParameter.IS_OUTPUT_IMAGES_TO_DIR, Boolean.TRUE);
exporter.setParameter(JRHtmlExporterParameter.IS_USING_IMAGES_TO_ALIGN, Boolean.FALSE);
exporter.setParameter(JRHtmlExporterParameter.IS_WHITE_PAGE_BACKGROUND, Boolean.FALSE);
exporter.exportReport();
byte[] bdata = ((ByteArrayOutputStream) baos).toByteArray();
Can any one help pls
Message was edited by:
ameet.auhey sorry for posting it in this forum.
but do u have sample code for making it work.. since i am able to do it on PDF format(image from Database and another stored in the webserver) using
byte image[] =(byte[]) outData.get("image");
ByteArrayInputStream img = new ByteArrayInputStream(image);
hmimg.put("P_PARAMV3", img);
print = JasperFillManager.fillReport(reportFileName, hmimg, jrxmlds);
bdata= JasperExportManager.exportReportToPdf(print); -
Bad performance when open a bi publisher report in excel
We use bi publisher(xml publisher) to create a customized report. For a small report, user like it very much. But for a bigger report, users complain about the performance when they open the file.
I know it is not a native excel file, that may cause the bad performance. So I ask my user to save it to a new file as a native excel format. The new file still worse than a normal excel file when we open it.
I did a test. We try to save a bi publish report to excel format, the size shrink to 4Mb. But if we "copy all" and "Paste Special" value only to a new excel file, the size is only 1Mb.
Do I have any way to improve that, users are complaining everyday. Thanks!
I did a test today.
I create a test report
Test 1: Original file from BIP in EBS is 10Mb. We save it in my local disk, when we open the file, it takes 43 sec.
Test 2: We save the file in native excel format, the file size is 2.28Mb, it takes 7 sec. to open.
Test 3: We copy all cell and "PasteSpecial" to a new excel file with value only. The file size is 1.66Mb, it takes only 1 sec to open.
Edited by: Rex Lin on 2010/3/31 下午 11:26EBS or Standalone BIP?
If EBS see this thread for suggestions on performance tuning and hints and tips:
EBS BIP Performance Tuning - Definitive Guide?
Note also that I did end up rewriting my report as PL/SQL producing a csv file and have done with several large reports in BIP on EBS.
Cheers,
Dave -
Sup buddies,
How can I control what images load on my project to save preload time and avoid loading all images, elements, divs not yet visible?
As the project grows in size the load time increases. How does one control not loading all images ,divs,elements etc. until they're
needed on the timeline? For example some sections are off and only become visible when recalled. My projects slowly grow in size so loading
all images , is counter productive . My other option would be to create separate htmls but that breaks the seamless user experience .
TY...Over N Out...hello, kiwi
quote: "Is there an easy way to burn a completed project to DVD, but keep only the (lo res, lo size) previews on my hard drive?"
yes.
maybe,...
1. you might think of making DVD backups first prior to importing the photos into Aperture. "Store Files: In their current location" once in Aperture make low rez Previews, and export finished Project.
or,
2. bring in the photographs to hard drive first prior to importing the photos into Aperture. "Store Files: In their current location" once in Aperture make low rez Previews, and export finished Project.
the low rez Previews will stay in Aperture but the high quality Versions will be exported onto DVDs and gone from the hard drive (if you delete the originals).
another way would be to export small about 50-70 pixel wide high quality jpegs to a folder on your Desktop and import & keep these in Aperture Library as a reference. make metadata to show where the original Project DVDs are stored and DVD filing system used.
victor -
Any Way I Can Make My Page's Images Load One At a Time?
Hi folks,
I have a page with a stack of large images. It takes several seconds for them all to load, but I was wondering if there's any way I could dictate the order in which all of these images load? This way, the top image would load first, then the the next one down, and so on, leaving little perceivable page load time for visitors.
It seems like this would be a common necessity for a web page, does anyone know an easy (because I know very little about this) way to do this?
Thanks!One major problem, is that you have scaled the images in DW, and not in a graphics program. I have your page open in the background and it's been a while loading and it's still not finished :-)
eg: the following images has properties of:
http://www.selfeffacingtheories.com/web-content/pictures/picpics/holes.jpg
933px × 699px but you have scaled it to: 615px × 458px
Trying to put your page through the Web Optimiser - doesn't show a very good result - it couldn't be tested because it exceed the size requirement.
http://www.websiteoptimization.com/services/analyze/
The size of this web page (4264698 bytes) has exceeded the maximum size of 3000000 bytes.
This is just way too big a file size and seriously needs to be optimised. The only way to do this is to scale down the images in either Photoshop or Fireworks.
Why not use a lightbox effect, where you show a much smaller size of the image and then when someone clicks on it they see a much larger version of the image:
My small demo here: (using the Dreamweaver Lightbox Extension)
http://dreamweaverresources.com/tutorials/dreamweaver-lightbox/
Maybe you are looking for
-
Importing from iMovie to FCP -- Timeline
I've been using iMovie and am about to upgrade to FCP. If I import an iMovie project file into FCP, does it import the clips and the timeline/editorial layout? In other words, will I be able to see my layout/edits in the FCP timeline, or will FCP onl
-
Hi, I have this MacBook Pro 13 inch mid 2010 model. I want to connect to my HDMI tv which has 2 HDMI inputs and VGA, and Audio. someone said I could connect with a mini DVI to HDMI adapter but it might not have audio (which from what I can tell from
-
Could u tell me how2control printing out the certain page in smartforms?
there are many pages when I preview , but I only need one or several of the pages. How to print the certain page in smartforms? and if there are several windows in one page how can I just print out one or several windows of them? what should I inser
-
Oracle BI EE 10.1.3.4 not getting installed on Linux Itanium
Hi I am installing Oracle BI EE 10.1.3.4 (evaluation version downloaded from OTN) on Red Hat Enterprise Linux 5 on Itanium (64 bit) server. As I have read in documentation, OBIEE comes only in 32 bit and should have 32 bit emulation on the 64 bit ser
-
Can Automator be used to generate iCal backups?
I would like to use Automator to run iCal's backup utility - namely File > Back up iCal.... Has anyone done this? It seems like this should be fairly straightforward but I'm not seeing how this can be done from within Automator. TIA!