我想通过打开一次FTP连接来优化性能。可以吗?
我正在做,
public void method1()
{
for(loop)
{
List li = someList;
method2(li); //Here I am calling this method in loop. This method has code for FTP connection. So for every iteration it is opening FTP connection in method2().
}
}
public void method2(List li)
{
open FTP connection // FTP connect code here
once FTP connection obtained ....do some other stuff...
}
谢谢。