Cruisers Forum
 

Go Back   Cruisers & Sailing Forums > Seamanship, Navigation & Boat Handling > OpenCPN
Cruiser Wiki Click Here to Login
Register Vendors FAQ Community Calendar Today's Posts Log in

Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 06-12-2015, 16:45   #361
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,766
Images: 2
Re: OpenCPN Beta test 4.1.1108 Release

That's great Sean.
Here is the same file using TDan's python vdrplayer with RooieDirk's Target Scaling version of Opencpn

I could not run at 0.0001 or it crashed immediately, but it does run at 0.0002 witth eventual freeze.
Attached Thumbnails
Click image for larger version

Name:	VDR-Ais.png
Views:	181
Size:	168.3 KB
ID:	114437  
rgleason is offline   Reply With Quote
Old 06-12-2015, 16:45   #362
Registered User
 
LeaseOnLife's Avatar

Join Date: Apr 2008
Location: out cruising again, currently in Fiji
Boat: Sailboat
Posts: 1,472
Re: OpenCPN Beta test 4.1.1108 Release

Quote:
Originally Posted by boat_alexandra View Post
Dirk

I have resolved
Sean

I don't know how to merge your pull request to my opencpn master...
So I cloned your opencpn fork (git clone https://github.com/seandepagnier/OpenCPN) and switched to branch ais-optimizer (git checkout -b ais_optimizations), then compiled, installed. Result, no difference in the CPU "leak", for this test. I hope I got above right.


Setup:
  • show target tracks length: 0nm and unchecked
  • AIS target list: limit range NM: 1000
  • AIS target list: clicked "hide all tracks"

19:15 start 10% cpu after started
19:20 CPU 30-35%, 1741 targets
19:25 CPU 40-45%, 1859 targets
19:30 CPU 55-60%, 2738 targets
19:35 CPU 70-75%, 3440 targets
...

Before the CPU "leak" hits, rendering lots of AIS targets does seem snappier, I do would like to see this pull request included.

Dirk
LeaseOnLife is offline   Reply With Quote
Old 06-12-2015, 18:16   #363
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 6,008
Re: OpenCPN Beta test 4.1.1108 Release

The "freeze" appears to be in this function:

void AIS_Decoder::OnTimerAIS( wxTimerEvent& event )

I believe that when there are thousands and thousands of AIS targets that when targets start going "stale" this function gets into a mode where it never returns. Every time it deletes a target then it seems to start over from the beginning looking for stale targets. It never seems to get all the way through about 18,000 targets without one going stale then it has to start over.

So I believe there is some kind of logic bug in this code that is only triggered when there are many thousands of AIS targets.
transmitterdan is offline   Reply With Quote
Old 06-12-2015, 23:36   #364
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,426
Re: OpenCPN Beta test 4.1.1108 Release

Quote:
Originally Posted by LeaseOnLife View Post
Sean
Before the CPU "leak" hits, rendering lots of AIS targets does seem snappier, I do would like to see this pull request included.

Dirk
That is all it does, it improves performance in opengl rendering targets.

Quote:
Originally Posted by transmitterdan View Post
The "freeze" appears to be in this function:

void AIS_Decoder::OnTimerAIS( wxTimerEvent& event )

I believe that when there are thousands and thousands of AIS targets that when targets start going "stale" this function gets into a mode where it never returns. Every time it deletes a target then it seems to start over from the beginning looking for stale targets. It never seems to get all the way through about 18,000 targets without one going stale then it has to start over.

So I believe there is some kind of logic bug in this code that is only triggered when there are many thousands of AIS targets.
I have see other similar problems. It should not start over from the beginning after deleting a target, but instead should continue. This will make a huge difference in performance.
seandepagnier is offline   Reply With Quote
Old 07-12-2015, 03:26   #365
Registered User

Join Date: Sep 2009
Location: Angers - France
Boat: Beneteau First 29 Ptizef
Posts: 844
Re: OpenCPN Beta test 4.1.1108 Release

Dave
"the "clipping" of the "Send/Cancel/Save" buttons."

seems to be fixed

Jean Pierre
Ptizef is offline   Reply With Quote
Old 07-12-2015, 04:43   #366
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 6,008
Re: OpenCPN Beta test 4.1.1108 Release

Quote:
Originally Posted by boat_alexandra View Post
I have see other similar problems. It should not start over from the beginning after deleting a target, but instead should continue. This will make a huge difference in performance.
A PR has been submitted. Would appreciate if others could test on Linux as I an only test on Windows at present. I don't see anything in the PR that is OS dependent though.

On my slow AMD A8 running Windows 10 the PR makes O useable vs. unuseable with 20K AIS targets.
transmitterdan is offline   Reply With Quote
Old 07-12-2015, 06:44   #367
Registered User

Join Date: Jul 2010
Location: Hannover - Germany
Boat: Amel Sharki
Posts: 2,547
Re: OpenCPN Beta test 4.1.1108 Release

Quote:
Originally Posted by transmitterdan View Post
A PR has been submitted. Would appreciate if others could test on Linux as I an only test on Windows at present. I don't see anything in the PR that is OS dependent though.

On my slow AMD A8 running Windows 10 the PR makes O useable vs. unuseable with 20K AIS targets.
Here with Mac OS X your patch doesn't change anything. With and without this patch OCPN with more than 20K AIS targets runs as usual. The CPU usage is at ~40% running the VDR file. Checking who is responsible for this higher CPU usage (normally at ~4%) the OS X tools points to AIS_Decoder::OnTimerAIS().
I observed however when running this VDR file and then stopping VDR, the AIS data is still processed and the AIS list still grows further. This seems to be a bug.

Gerhard
CarCode is offline   Reply With Quote
Old 07-12-2015, 07:08   #368
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 6,008
Re: OpenCPN Beta test 4.1.1108 Release

Gerhard,

I don't think it is a "bug" but rather reflects various ways of handling the message queue. On my system when I stop playing the VDR data then after the time specified the AIS list begins to decrease. Eventually the entire lists goes away.

I suspect if you are using the VDR plugin (I am not) the messages read from the file get queued and it takes a while for them to all be processed.

There is no memory leak and if the message stream is limited to about 200 per second then O works as expected here. But if I increase the message rate to 1000-2000 messages per second CPU usage maxes out. But is that a realistic scenario? I doubt it.
transmitterdan is offline   Reply With Quote
Old 07-12-2015, 07:56   #369
Registered User

Join Date: Jul 2010
Location: Hannover - Germany
Boat: Amel Sharki
Posts: 2,547
Re: OpenCPN Beta test 4.1.1108 Release

Quote:
Originally Posted by transmitterdan View Post
There is no memory leak and if the message stream is limited to about 200 per second then O works as expected here. But if I increase the message rate to 1000-2000 messages per second CPU usage maxes out. But is that a realistic scenario? I doubt it.
You should be able to check the max limit of AIS messages when calculating the baudrate 38400 for AIS and the max possible AIS message length.
Last year there was a TCP address for a sender of raw AIS data for the Baltic Sea which seems not to work anymore. I got about 1200 or more AIS targets from it and an older version of OCPN goes significally down to display them when the whole Baltic Sea was on the screen. Zooming in to display less targets makes OCPN usable again. With the actual OCPN version I don't see this problem anymore.

Gerhard
CarCode is offline   Reply With Quote
Old 07-12-2015, 13:15   #370
Registered User
 
Gilletarom's Avatar

Join Date: Mar 2010
Location: France
Boat: 10.50 mètres
Posts: 3,022
Re: OpenCPN Beta test 4.1.1108 Release

Hello Dave,

At other times, I would have used the old i18 thread but it is "out of service".

I just perform rereading of all items in the language file of the core of OpenCPN. This allowed me to correct various small spelling mistakes and adjust some item in the French version.

Incidentally, the name of the state of Libya is no longer the one in OpenCPN.

Best regards. Gilletarom.
Gilletarom is offline   Reply With Quote
Old 07-12-2015, 13:40   #371
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 4,290
Re: OpenCPN Beta test 4.1.1108 Release

Dave, Pavel
Gille... is correct.
According to "www.itu.int/online/mms/glad/cga_mids.sh?lng=E"
"Libyan Arab Jamahiriya" is changed to "Libya"

Could you please change the MMSI MDI list or should I make a pull request?

Code:
diff --git a/src/AIS_Target_Data.cpp b/src/AIS_Target_Data.cpp
index 3186094..8019c6e 100644
--- a/src/AIS_Target_Data.cpp
+++ b/src/AIS_Target_Data.cpp
@@ -1142,7 +1142,7 @@ wxString AIS_Target_Data::GetCountryCode( bool b_CntryLongStr )  //false = Short
     case 638: return b_CntryLongStr ? _("South Sudan (Republic of)") : _T("SS") ;
-    case 642: return b_CntryLongStr ? _("Libyan Arab Jamahiriya") : _T("LY") ;
+    case 642: return b_CntryLongStr ? _("Libya") : _T("LY") ;
     case 644: return b_CntryLongStr ? _("Lesotho") : _T("LS") ;
     ;
Håkan
Hakan is offline   Reply With Quote
Old 07-12-2015, 14:10   #372
Registered User
 
Gilletarom's Avatar

Join Date: Mar 2010
Location: France
Boat: 10.50 mètres
Posts: 3,022
Re: OpenCPN Beta test 4.1.1108 Release

Dave,

I'm testing with a compilation of the latest version with the latest developments. Compilation provided by Jean-Pierre today.

A curiosity on my machine at least.
Look at the icon of the "toolbox". It is a curious phenomenon that has existed since the initial release 411108. The icon may be displayed in small, sometimes normal size. Just approach the mouse to the icon resumes its normal size.
Attached Thumbnails
Click image for larger version

Name:	2015-12-07-OpenCPN 4.1.1108_Tools_icon.jpg
Views:	214
Size:	46.3 KB
ID:	114497  
Gilletarom is offline   Reply With Quote
Old 07-12-2015, 14:31   #373
Registered User
 
Gilletarom's Avatar

Join Date: Mar 2010
Location: France
Boat: 10.50 mètres
Posts: 3,022
Re: OpenCPN Beta test 4.1.1108 Release

Dave,

You can change the text of an item "Enabled scale graphics tablet interface" as it also works with PCs that are not tablets.
Gilletarom is offline   Reply With Quote
Old 07-12-2015, 14:36   #374
Registered User
 
LeaseOnLife's Avatar

Join Date: Apr 2008
Location: out cruising again, currently in Fiji
Boat: Sailboat
Posts: 1,472
Re: OpenCPN Beta test 4.1.1108 Release

Quote:
Originally Posted by transmitterdan View Post
A PR has been submitted. Would appreciate if others could test on Linux as I an only test on Windows at present. I don't see anything in the PR that is OS dependent though.

On my slow AMD A8 running Windows 10 the PR makes O useable vs. unuseable with 20K AIS targets.
Did you leave it running for a longer time?

I compiled your git master, including your #482, but see no change in performance on my linux box. As with any other I tried, it is fine @10 min runtime with ~20000 targets but gets worse from there while the target count increases only slightly:

  • 17:04 start opencpn from transmitterdan
  • 17:11 40% CPU, 19815 targets
  • 17:15 60% CPU, 20938 targets
  • 17:21 80% CPU, 22057 targets
  • 17:26 95% CPU, 22647 targets
LeaseOnLife is offline   Reply With Quote
Old 07-12-2015, 16:00   #375
Registered User
 
Gilletarom's Avatar

Join Date: Mar 2010
Location: France
Boat: 10.50 mètres
Posts: 3,022
Re: OpenCPN Beta test 4.1.1108 Release

Hello All,
I managed to enlarge the texts that appear in the window that displays the data on an AIS target. For this I change the size of a font
But I can not enlarge the font size in the window of the list of AIS targets.

Who can tell me what to do?

Thank by advance. Best regards. Gilletarom.
Gilletarom is offline   Reply With Quote
Reply

Tags
enc, lease, opencpn


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenCPN Beta test 4.1.1022 Release bdbcat OpenCPN 122 07-11-2015 01:12
OpenCPN Beta test 4.1.925 Release bdbcat OpenCPN 177 04-11-2015 08:16
OpenCPN Beta test 4.1.602 Release bdbcat OpenCPN 193 13-10-2015 08:19
OpenCPN Version 2.2 Beta Test bdbcat OpenCPN 437 15-12-2010 19:17
OpenCPN Version 2.2 Beta Test Bugs / Discussion bdbcat OpenCPN 120 26-09-2010 02:53

Advertise Here


All times are GMT -7. The time now is 18:44.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.