High CPU consumption when labels enabled

Discussion of development versions only
Post Reply
koshi
Posts: 5
Joined: 10 Aug 2010 17:46

High CPU consumption when labels enabled

Post by koshi » 10 Aug 2010 18:58

1. Gephi is causing constant high CPU usage when labels enabled. It eats CPU time even when minimised.
2. Gephi use much more CPU time when mouse cursor is based over the graph window.
3. Yet worse. If you will change the font size (using font dialog, not scrolling) an interface become almost frozen (with 100% CPU load).
4. If you will minimise window and then restore it a graph will disappear (although a center button will help).

Tested on relatively small graph (less than 500 nodes and 600 edges).
-
Product Version: Gephi 0.7 alpha4 200912041610
Java: 1.6.0_17; Java HotSpot(TM) Client VM 14.3-b01
CPU: 2800 MHz.
Integrated video card.

User avatar
mbastian
Gephi Architect
Posts: 728
Joined: 10 Dec 2009 10:11
Location: San Francisco, CA

Re: High CPU consumption when labels enabled

Post by mbastian » 13 Aug 2010 08:35

1. Gephi is causing constant high CPU usage when labels enabled. It eats CPU time even when minimised.
Depends on your hardware, but the overhead of labels should be reasonable. It is optimized by modern graphic cards. Did you try to update your graphic driver?
2. Gephi use much more CPU time when mouse cursor is based over the graph window.
This is totally normal, when the mouse is over the graph the speed is targeting 30 FPS to zoom smoothly. When mouse is out, we need only to refresh the graph when layout so the speed is reduced automatically to let other parts of the application use CPU, for instance layout.
3. Yet worse. If you will change the font size (using font dialog, not scrolling) an interface become almost frozen (with 100% CPU load).
Yes I notices this Font dialog takes a while to open, I don't know currently why. If you do it a second time is it faster?
4. If you will minimise window and then restore it a graph will disappear (although a center button will help).
You mean it flickr or disappear completely?

koshi
Posts: 5
Joined: 10 Aug 2010 17:46

Re: High CPU consumption when labels enabled

Post by koshi » 14 Aug 2010 18:45

Yes I notices this Font dialog takes a while to open, I don't know currently why. If you do it a second time is it faster?
The problem is not with Font dialog. It can be opened very quickly first time. But if you will change the font size, gephidesktop will change font size and after this it will start some calculations. And everything become slow. Changing the font size back will not help.
You mean it flickr or disappear completely?
After additional tests I think that this effect caused by high CPU load. A graph cannot be refreshed quickly because of high CPU load. So it seems like graph disappeared. But after some time it will appear on screen.

BTW I think it would be useful to have a filter for labels based on some parameter (like node filter).

User avatar
mbastian
Gephi Architect
Posts: 728
Joined: 10 Dec 2009 10:11
Location: San Francisco, CA

Re: High CPU consumption when labels enabled

Post by mbastian » 17 Aug 2010 09:07

I think these problems are related to low performance video card or issues with video driver. When the 3D library computes the texts, it uses essential features like creating textures. It is possible that due to a bug of the graphic driver, one of these features is done slowly. Could you execute this online test to know what is your hardware vendor?
BTW I think it would be useful to have a filter for labels based on some parameter (like node filter).
Yes, you mean to hide some labels?

koshi
Posts: 5
Joined: 10 Aug 2010 17:46

Re: High CPU consumption when labels enabled

Post by koshi » 17 Aug 2010 19:12

Of course I have low performance (integrated) video card (GeForce 7050 PV / NVIDIA nForce 630a/PCI/SSE2/3DNOW!). But there is certain bug (at least not optimal algorithm). And high performance video cards will just hide it.
When I turn on labels, rendering performance decreases. This is expected. But when I change font size, the performance will be decreased dramatically. This is unexpected behaviour. Note that this will happen even if I select more smaller font size (theoretically more smaller textures in this case should lead to increased performance). It seems like problem somewhere in the generation and handling of new textures.
Yes, you mean to hide some labels?
Yes. Hide labels based on a certain parameter instead of (in addition to) color/resize it. So we can show labels only for significant nodes. Maybe ability to enable labels on separate nodes (selected manually on graph or from data laboratory) will be useful too.

johnnyd
Posts: 2
Joined: 03 Oct 2013 23:10

Re: High CPU consumption when labels enabled

Post by johnnyd » 04 Oct 2013 13:35

Over 3 yrs later and this bug still exists. Yuk! Without labels everything is fine, but show labels & the CPU goes through the roof! I tried these workarounds, but I don't think they help:
1) decrease the label font size
2) show only edge labels
3) show only node labels

Here is what I am running:
* Mac Mini w/ 4gig of ram
* Latest version of OS X
* Java 1.6 downloaded from http://support.apple.com/kb/DL1572
* Thunderbolt display

johnnyd
Posts: 2
Joined: 03 Oct 2013 23:10

Re: High CPU consumption when labels enabled

Post by johnnyd » 08 Oct 2013 14:56

bump

Rob_Gephi
Posts: 1
Joined: 05 Aug 2014 23:53

Re: High CPU consumption when labels enabled

Post by Rob_Gephi » 06 Aug 2014 00:00

I realize this is an old thread but I am responding for posterity.

I had extremely slow performance under OSX with node labels enabled. (On the same machine it runs fine under a Debian VM).

For me, switching the node label font from the default (Arial?) to Consolas drastically sped it up.

I don't know why; it was a flying leap that a monospaced font might be faster but I don't suppose that's the real reason.

Product Version: Gephi 0.8.2 201210100934
Java: 1.6.0_65; Java HotSpot(TM) 64-Bit Server VM 20.65-b04-466.1
System: Mac OS X version 10.9.3 running on x86_64; MacRoman; en_US (gephi)

jasmyndube
Posts: 1
Joined: 02 Nov 2017 14:03

Re: High CPU consumption when labels enabled

Post by jasmyndube » 02 Nov 2017 14:17

it was a flying leap that a monospaced font might be faster but I don't suppose that's the real reason. Phen375

Post Reply