[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: r31993 - JavaHL Path.isUrl method

From: Talden <talden_at_gmail.com>
Date: Fri, 4 Jul 2008 13:01:19 +1200

> Not sure if you have any plans for this method, but it is generally
> not a good idea to use the java.net.URL class any more than necessary.
> When you construct the class doesn't it try to make a connection to
> the URL? It can make things very slow to use it.

It shouldn't do anything when creating the URL

  List<URL> list = new ArrayList<URL>();
  for(int i = 0 ; i < 1000; i++) list.add(new URL("http://some_domain/" + i));

That should execute much quicker than if it were testing the URL
validity for each create.

--
Talden
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-07-04 03:02:21 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.