Closed GoogleCodeExporter closed 9 years ago
Such CPU usage is too high. I usually have about only 30 torrents and did not
optimize the code for thousands torrents.
What the CPU usage on 1.4 version with the same number of torrents?
I will try to emulate your scenario and fix the bottleneck.
P.S. Free Pascal compiler makes as fast code as C/C++ compilers. The problem is
in coding :)
Original comment by j...@cp-lab.com
on 24 Aug 2010 at 7:44
Try this version:
http://transmisson-remote-gui.googlecode.com/files/transgui-2.1.1-setup.exe
Original comment by j...@cp-lab.com
on 25 Aug 2010 at 1:22
Much better. Still seems high for what it is doing, but compared to before, ..
night and day...there are still spikes like in the previous graph, but between
them, it's pretty quiet now, which is good.
I know there's going to be periodic spikes, well, I'll attach another graph in
a while, after it's filled up a page, but substantially better, thank-you!...
As for my comment about Pascal. I would suspect it can produce at least as
good as good as C++, though C++ code is not always as efficient as C code in
the minutiae, its just that Pascal is so much more verbose! that C.
I was *forced* to learn it as my *first* programming language in college and
remember struggling with it and the thing that I had the most problems with was
all the long keywords BEGIN/END vs. {} ... even assignment, the most common
thing possible, was twice as long as need be (':=' (or is it '=:') vs. '=').
etc... Plus C had little shortcuts like the ++a instead of a=a+1, or a*=3; for
a=a*3, and many times is the a++ useful in place of the ++a, where you want to
test a limit before it incremented or decremented, but want the post value
processed aftewards; I can't see that *anyone* would find it faster to program
in Pascal than in C, since they are very similar.
That's my biggest issue with Pascal that I remember. We had 1 lesson where we
had to use 'Cobol' in a course of sampling computer languages, ... much much
worse -- if you don't know, consider yourself fortunate.
Perform multiplication of X times 3 putting the result in X, instead of "x*=3".
(^error...forgot period at --------------------------------^)
(it would have error messages like that -- it knew what you meant, why didn't
it just put them in!?! Grgrh)
AAIIEEEE!!!.... If they wanted to make me very afraid, they did.
...
oops...wrote so long, it finished the graph...attching new file...you can see
there are gaps between the cpu usage -- still some interesting 'harmonic' wave
patterns, Each vertical line looks to be 10 seconds apart - or the time
between screen updates.
It's weird how it makes a 2 wave-patterns -- a faint one that goes between 55%
and 100% of a CPU every 10 cycles. Then there's a lower, thicker wave pattern
that also goes up and down in 100 second cycles that goes between about 50-75%
of a CPU, in sync with the lighter one. I wonder if that correlates to some
behavior in your program or if there's something else it's interacting with on
my machine....
*it's all black magic* (black!=bad...just dark, not too many lights inside most
computers).
Original comment by astara.a...@gmail.com
on 26 Aug 2010 at 12:04
Attachments:
Transmission Remote GUI have 2 threads. The main tread and the background
thread, which fetches data from the daemon. Probably that causes such graph.
Transmission uses CPU unfriendly JSON text format for RPC communication and it
causes extra CPU load on high data volumes.
It is possible to tweak the code a bit more, but the result does not worth the
needed efforts.
Original comment by j...@cp-lab.com
on 26 Aug 2010 at 7:37
Original issue reported on code.google.com by
astara.a...@gmail.com
on 24 Aug 2010 at 2:00Attachments: