SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Studio
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Studio Discussion related to the SageTV Studio application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the Studio software application should be posted here.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-20-2010, 01:10 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Open URL Stream in Java

is 1040ms to 1140ms a normally time just to open a url stream?

say I have u = new url(urladdress);

InputStream test = u.openStream();

the open stream call is taking anywhere from the above mentioned time which seems slow to me or am I crazy?
Reply With Quote
  #2  
Old 01-20-2010, 01:23 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
I haven't tried it, but I presume it's handshaking with the remote host to verify that the resource actually exists, so yeah, I'd expect it to take a few ping times to complete.
__________________
-- Greg
Reply With Quote
  #3  
Old 01-20-2010, 01:40 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
plucky, i've seen connections (urls, databases, etc) take over a second to "connect", but it's rare. Now, if this is a url on your own network, then that is not normal. if it's a remote network, then it could latency (pings will show this) or it could a slow site (overloaded, etc).

Sometimes, if you are writing a piece of test code, that simply starts ups, opens a connection, and then shuts down, you will see very long times. Much of that time is java initially finding/loading classes that have not been accessed (ie, urlconnection, httpurlconnection, etc). So typically when I'm doing performance testing, as a test script, i will do all the work once... then I'll do it again, and take the timings of the second call. The reason, it that it will take all the initial object creation times out of the equation.
Reply With Quote
  #4  
Old 01-20-2010, 01:46 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Quote:
Originally Posted by stuckless View Post
plucky, i've seen connections (urls, databases, etc) take over a second to "connect", but it's rare. Now, if this is a url on your own network, then that is not normal. if it's a remote network, then it could latency (pings will show this) or it could a slow site (overloaded, etc).

Sometimes, if you are writing a piece of test code, that simply starts ups, opens a connection, and then shuts down, you will see very long times. Much of that time is java initially finding/loading classes that have not been accessed (ie, urlconnection, httpurlconnection, etc). So typically when I'm doing performance testing, as a test script, i will do all the work once... then I'll do it again, and take the timings of the second call. The reason, it that it will take all the initial object creation times out of the equation.
Yeah repeated runs yield maybe 100ms to 200ms better. Guess that is just the name of the game was hoping for better results but I will live with it
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
What URL and ports are needed for the Program Guide? davephan SageTV Software 2 08-14-2009 07:08 AM
Dispaly JPeg Image from URL redbaron73 SageTV Software 0 01-03-2009 01:55 PM
Getting a Satellite Stream in Java Mahoney SageTV Customizations 0 02-10-2007 02:18 AM
Java: Too many open files jayemdae SageTV Linux 1 09-12-2006 06:01 AM


All times are GMT -6. The time now is 06:04 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.