[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

wxWidgets - wxFTP connections are slow on windows

Posted on 2008-06-21
14
Medium Priority
?
948 Views
Last Modified: 2013-11-29
Any ideas why connections made using wxWidgets' wxFTP are slow when run in windows? I made an application that will manage files on an ftp server using wxWidgets. When the program is run in windows, the program is able to authenticate quickly enough but beyond that and things like FileExists and GetOuputStream take hellishly long to complete. Whereas the linux version runs really fast. What's even more interesting is that the windows version run under wine runs just as fast as the linux version. Any ideas how to fix this?
0
Comment
Question by:trigger-happy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
14 Comments
 
LVL 14

Author Comment

by:trigger-happy
ID: 21850674
Can anyone answer? :(

--trigger-happy
0
 
LVL 14

Author Comment

by:trigger-happy
ID: 21890293
Platform is Windows XP since the problem is windows specific, library used is wxWidgets 2.8.7 compiled with mingw32 (cross compiler on a Fedora 9 system, both wxwidgets and the application I'm making are using the same compiler).

--trigger-happy
0
 
LVL 57

Expert Comment

by:giltjr
ID: 21890652
Have no idea what wxWidgets is, but here are a few questions, which you may have already looked at.

How busy is the CPU when this function is running?
How much memory is is use when this function is running?
Is there a lot of disk I/O?

I will assume that there is no difference between the network connections, CPU, and memory, and normal workload running on the Windows and Linux boxes.

When you say slow, can you give a comparison of just how slow.  Like doing a function on Linux take 5 seconds and on Windows it takes 100 seconds.
0
Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

 
LVL 14

Author Comment

by:trigger-happy
ID: 21890806
There's barely any change in CPU and Mem and barely any disk activity as well. In terms of network connections, there's no difference at all since I dual boot my desktop while my laptop runs an ftp server for testing (which my program connects to). In terms of speed, the linux binary of the program completes the startup operations (connect, check for certain files, download some files and standby) in about 1 second, windows takes about 1 minute.

--trigger-happy
0
 
LVL 57

Expert Comment

by:giltjr
ID: 21891359
Umm, interesting.  Have you run a packet capture while under Windows?  How is the ftp server found?  Meaning do you refer to it by name (DNS lookup required) or by IP address?

If you refer to it by name, try using IP address.  If that works much faster, then you have a DNS resolution problem someplace.

You may want to try running a packet capture on the client when running it under Windows to see what the network traffic looks like.  This will also verify if there is a DNS resolution issue.

0
 
LVL 14

Author Comment

by:trigger-happy
ID: 21892350
Haven't tried that yet but will do in a while, though i've always been referring to the server using its IP address

--trigger-happy
0
 
LVL 57

Expert Comment

by:giltjr
ID: 21892616
Darn.  Well if you are using the IP address, unless something else is going on under the covers that needs a name (or IP address reverse lookup) resolution a packet capture may be your best bet.
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 21892697
I also have no experience with that library.  However, an (oldish) problem with that function related to slow reverse lookup -- when using IP address
   http://trac.wxwidgets.org/ticket/2512
   http://lists.wxwidgets.org/pipermail/wx-dev/2005-May/062897.html

It might be worth a try to use a domain name -- in text, not ip numbers.

Also, if this the the problem, try getting the latest version of the library.
0
 
LVL 14

Author Comment

by:trigger-happy
ID: 21906734
Sorry it took me a while, had some stuff to take care of. In any case, I've uploaded the captured data of the program running in windows and linux. I've only included the ftp related data in the capture. As you can see, everything is exactly the same except for the time it took for the things to complete. Oh and disregard the last few lines of the windows capture, I closed the program in question before I stopped capturing in wireshark.

Link: http://www.geocities.com/trigger_happy_elite/captures.zip

--trigger-happy
0
 
LVL 57

Expert Comment

by:giltjr
ID: 21908517
To make sure I understand everything:

 packet catpure was run on the client where the wxWidgets is running
192.168.1.100 = client where wxWidget is running
192.168.1.102 = FTP server

If this is correct you can see a definite issue on the client between the two.  If you look at both traces at the same time look packets 7 and 8 in both traces.  You will see the server sending back "Entering Passive Mode".   However, Linux responds with the NLST cc_main.swf request in 0.45 seconds, whereas Windows takes 9.0 seconds.

In almost every case, it takes Windows 8-9 seconds to respond after receiving "Entering Passive Mode".

That was the easy part.  The hard part is figuring out why.  What you may want to do (I have no clue how these Widgets work) is see if you can display messages and time stamps as the program goes along.  So you display a message when the Widget sends the PASV request (with timestamp), display a message (with timestamp) when the response comes back, and then display a message (again with timestamp) when the program sends the NLST command.  This MAY help isolate where the time is being spent.
0
 
LVL 14

Accepted Solution

by:
trigger-happy earned 0 total points
ID: 21931355
Ok so I found out through the wxwidgets forums that the issue is due to some windows specific stuff within the library.
http://wxforum.shadonet.com/viewtopic.php?t=19928
I haven't actually tested the intrusive fix mentioned (I got compiler errors that I'm still resolving) but at least I found the reason there. I'll have this question closed if you guys don't mind since I found he solution elsewhere.

--trigger-happy
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have done a reformat of your hard drive and proceeded to do a successful Windows XP installation, you may notice that a choice between two operating systems when you start up the machine. Here is how to get rid of this: Click Start Clic…
We recently endured a series of broadcast storms that caused our ISP to shut us down for brief periods of time. After going through a multitude of tests, we determined that the issue was related to Intel NIC drivers on some new HP desktop computers …
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question