Cruisers Forum
 


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 02-02-2014, 16:41   #151
Registered User
 
LeaseOnLife's Avatar

Join Date: Apr 2008
Location: out cruising again, currently in Fiji
Boat: Sailboat
Posts: 1,466
Re: Optimized Opencpn: Testers Needed

I added a token too..

Dirk
LeaseOnLife is offline   Reply With Quote
Old 04-03-2014, 03:17   #152
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Re: Optimized Opencpn: Testers Needed

boat_alexandra

Sean
Has the development stalled? No change in git for over a month.
Just curious.

Thomas
cagney is offline   Reply With Quote
Old 04-03-2014, 03:36   #153
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: Optimized Opencpn: Testers Needed

I did 3 days of work fixing all known bugs, and improving things more than ever, only to have the netbook I was using fail to boot. It was constantly resetting anyway from thermal issues. The fixes are stored on the hard drive and I don't want to rework them. I am 2-3 weeks from getting a usb reader, and an new motherboard for the netbook. I'm sure I can read the changes then.

I intend to fix any lingering bugs with this branch, as well as implement serious speedups for raster charts, but not for a few weeks.
seandepagnier is offline   Reply With Quote
Old 07-03-2014, 04:08   #154
Registered User
 
dandrews's Avatar

Join Date: Nov 2010
Location: Shirley, MA
Boat: Bristol 34
Posts: 235
Quote:
Originally Posted by boat_alexandra View Post
I did 3 days of work fixing all known bugs, and improving things more than ever, only to have the netbook I was using fail to boot. It was constantly resetting anyway from thermal issues. The fixes are stored on the hard drive and I don't want to rework them. I am 2-3 weeks from getting a usb reader, and an new motherboard for the netbook. I'm sure I can read the changes then.

I intend to fix any lingering bugs with this branch, as well as implement serious speedups for raster charts, but not for a few weeks.
Dang that is the 2nd machine to go bellyup on you. Bad luck indeed.

Don
dandrews is offline   Reply With Quote
Old 07-03-2014, 07:26   #155
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: Optimized Opencpn: Testers Needed

No, only one machine, it was that one that had some work which is why development stalled for this.. I have plenty of other things to work on in the meantime.
seandepagnier is offline   Reply With Quote
Old 23-03-2014, 20:47   #156
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: Optimized Opencpn: Testers Needed

So now my laptop died the day after I got my netbook working again.. gah!

The new motherboard for the netbook has a dual core processor which seemed like an upgrade until I realized the reason it is always clocked at 800mhz instead of 1.6ghz is because it is overheating...

Anyway, I have finished initial work for improved raster chart loading. It is much much faster, even at 800mhz. I am getting 30+fps on the underclocked netbook and 60+fps on the chromebook. During quilted mode, it is so much better now to be able to move around without delays.

Also, OpenCPN no longer uses ram. By this I mean it basically uses the same amount of ram as right at startup, around 60mb (because of all the libraries it loads) and doesn't really exceed this. I have also limited graphics memory usage to only 16MB with great results because it can swap data in and out so fast, but even if limited to 1MB, then it will use a bit more (whatever is needed for just that frame) and the results are quite fast.

The work is in a new branch called "optimum" in github.com/seandepagnier/OpenCPN

If compression caching is enabled (in opengl options window) then initially things are quite slow, Until you zoom out enough to see the entire chart, then it is completely cached. This is temporary, and will be fixed soon.

On my buggy chromebook I had to copy the cache from the netbook as it can load compressed, but readback is broken. I can fix this with a software library, so it may not work correctly on all systems yet.

Future plans:
- make it generate the cache when it builds the chart database. This adds the ability to store raster charts on removable media, and then you can unplug this once the cache is created to the local disk.
- Use gz or simple fast compression as the cache is a bit bigger than the original charts, but this won't slow it down too much and tests show it will keep the size on disk the same after doing this.
- explore other compression schemes, and possibly write a fragment shader specifically for compression charts (low color count) which could reduce memory and therefore increase speed by a much larger factor.

Also there are other fixes from before dealing with the vector charts etc.. which can be tested.. so let me know of any issues at all with this branch. Thanks, for testing.
seandepagnier is offline   Reply With Quote
Old 28-03-2014, 09:55   #157
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: Optimized Opencpn: Testers Needed

I have completed the work to build the entire cache when the chart database is updated. Opengl, texture compression, and texture compression caching must all be enabled, and then a rebuild of the chart database performed.

Once created, the chart files are no longer needed, they can be kept on an external drive. There are many ways to reduce the disk usage of the cache I have not explored any yet.
Code:
git clone https://github.com/seandepagnier/OpenCPN
git checkout optimum
Please send feedback.
seandepagnier is offline   Reply With Quote
Old 28-03-2014, 10:23   #158
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,211
Re: Optimized Opencpn: Testers Needed

Sean...
The speed is clearly impressive. I don't currently have time to dive into the code, so just plain old user report - While zooming out with the keyboard and just the basemap, I had a few
Code:
opencpn: /home/nohal/source/opencpn/src/bbox.cpp:167: OVERLAP wxBoundingBox::Intersect(wxBoundingBox&, double): Assertion `m_validbbox == 1' failed.
Aborted
And worse, attached is what I see instead of the charts.

EDIT: The culprit is texture compression, turning it off cleans the mess up.

glxinfo:
Code:
name of display: :0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
    GLX_ARB_multisample, GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, 
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_copy_sub_buffer, 
    GLX_OML_swap_method, GLX_SGI_swap_control, GLX_SGIS_multisample, 
    GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group, 
    GLX_INTEL_swap_event
client glx vendor string: Mesa Project and SGI
client glx version string: 1.4
client glx extensions:
    GLX_ARB_create_context, GLX_ARB_create_context_profile, 
    GLX_ARB_create_context_robustness, GLX_ARB_get_proc_address, 
    GLX_ARB_multisample, GLX_EXT_import_context, GLX_EXT_visual_info, 
    GLX_EXT_visual_rating, GLX_EXT_framebuffer_sRGB, 
    GLX_EXT_create_context_es2_profile, GLX_MESA_copy_sub_buffer, 
    GLX_MESA_multithread_makecurrent, GLX_MESA_swap_control, 
    GLX_OML_swap_method, GLX_OML_sync_control, GLX_SGI_make_current_read, 
    GLX_SGI_swap_control, GLX_SGI_video_sync, GLX_SGIS_multisample, 
    GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group, 
    GLX_EXT_texture_from_pixmap, GLX_INTEL_swap_event
GLX version: 1.4
GLX extensions:
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context, 
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_copy_sub_buffer, 
    GLX_MESA_multithread_makecurrent, GLX_MESA_swap_control, 
    GLX_OML_swap_method, GLX_OML_sync_control, GLX_SGI_make_current_read, 
    GLX_SGI_swap_control, GLX_SGI_video_sync, GLX_SGIS_multisample, 
    GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group, 
    GLX_EXT_texture_from_pixmap, GLX_INTEL_swap_event
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Ironlake Mobile 
OpenGL version string: 2.1 Mesa 9.0.1
OpenGL shading language version string: 1.20
OpenGL extensions:
    GL_ARB_multisample, GL_EXT_abgr, GL_EXT_bgra, GL_EXT_blend_color, 
    GL_EXT_blend_minmax, GL_EXT_blend_subtract, GL_EXT_copy_texture, 
    GL_EXT_polygon_offset, GL_EXT_subtexture, GL_EXT_texture_object, 
    GL_EXT_vertex_array, GL_EXT_compiled_vertex_array, GL_EXT_texture, 
    GL_EXT_texture3D, GL_IBM_rasterpos_clip, GL_ARB_point_parameters, 
    GL_EXT_draw_range_elements, GL_EXT_packed_pixels, GL_EXT_point_parameters, 
    GL_EXT_rescale_normal, GL_EXT_separate_specular_color, 
    GL_EXT_texture_edge_clamp, GL_SGIS_generate_mipmap, 
    GL_SGIS_texture_border_clamp, GL_SGIS_texture_edge_clamp, 
    GL_SGIS_texture_lod, GL_ARB_framebuffer_sRGB, GL_ARB_multitexture, 
    GL_EXT_framebuffer_sRGB, GL_IBM_multimode_draw_arrays, 
    GL_IBM_texture_mirrored_repeat, GL_3DFX_texture_compression_FXT1, 
    GL_ARB_texture_cube_map, GL_ARB_texture_env_add, GL_ARB_transpose_matrix, 
    GL_EXT_blend_func_separate, GL_EXT_fog_coord, GL_EXT_multi_draw_arrays, 
    GL_EXT_secondary_color, GL_EXT_texture_env_add, 
    GL_EXT_texture_filter_anisotropic, GL_EXT_texture_lod_bias, 
    GL_INGR_blend_func_separate, GL_NV_blend_square, GL_NV_light_max_exponent, 
    GL_NV_texgen_reflection, GL_NV_texture_env_combine4, GL_S3_s3tc, 
    GL_SUN_multi_draw_arrays, GL_ARB_texture_border_clamp, 
    GL_ARB_texture_compression, GL_EXT_framebuffer_object, 
    GL_EXT_texture_compression_s3tc, GL_EXT_texture_env_combine, 
    GL_EXT_texture_env_dot3, GL_MESA_window_pos, GL_NV_packed_depth_stencil, 
    GL_NV_texture_rectangle, GL_NV_vertex_program, GL_ARB_depth_texture, 
    GL_ARB_occlusion_query, GL_ARB_shadow, GL_ARB_texture_env_combine, 
    GL_ARB_texture_env_crossbar, GL_ARB_texture_env_dot3, 
    GL_ARB_texture_mirrored_repeat, GL_ARB_window_pos, GL_ATI_envmap_bumpmap, 
    GL_EXT_stencil_two_side, GL_EXT_texture_cube_map, GL_NV_depth_clamp, 
    GL_NV_vertex_program1_1, GL_APPLE_packed_pixels, 
    GL_APPLE_vertex_array_object, GL_ARB_draw_buffers, 
    GL_ARB_fragment_program, GL_ARB_fragment_shader, GL_ARB_shader_objects, 
    GL_ARB_vertex_program, GL_ARB_vertex_shader, GL_ATI_draw_buffers, 
    GL_ATI_texture_env_combine3, GL_ATI_texture_float, GL_EXT_shadow_funcs, 
    GL_EXT_stencil_wrap, GL_MESA_pack_invert, GL_MESA_ycbcr_texture, 
    GL_NV_primitive_restart, GL_ARB_depth_clamp, 
    GL_ARB_fragment_program_shadow, GL_ARB_half_float_pixel, 
    GL_ARB_occlusion_query2, GL_ARB_point_sprite, GL_ARB_shading_language_100, 
    GL_ARB_sync, GL_ARB_texture_non_power_of_two, GL_ARB_vertex_buffer_object, 
    GL_ATI_blend_equation_separate, GL_EXT_blend_equation_separate, 
    GL_OES_read_format, GL_ARB_color_buffer_float, GL_ARB_pixel_buffer_object, 
    GL_ARB_texture_compression_rgtc, GL_ARB_texture_float, 
    GL_ARB_texture_rectangle, GL_EXT_packed_float, GL_EXT_pixel_buffer_object, 
    GL_EXT_texture_compression_dxt1, GL_EXT_texture_compression_rgtc, 
    GL_EXT_texture_rectangle, GL_EXT_texture_sRGB, 
    GL_EXT_texture_shared_exponent, GL_ARB_framebuffer_object, 
    GL_EXT_framebuffer_blit, GL_EXT_framebuffer_multisample, 
    GL_EXT_packed_depth_stencil, GL_APPLE_object_purgeable, 
    GL_ARB_vertex_array_object, GL_ATI_separate_stencil, GL_EXT_draw_buffers2, 
    GL_EXT_draw_instanced, GL_EXT_gpu_program_parameters, 
    GL_EXT_texture_array, GL_EXT_texture_integer, GL_EXT_texture_sRGB_decode, 
    GL_EXT_timer_query, GL_OES_EGL_image, GL_MESA_texture_array, 
    GL_ARB_copy_buffer, GL_ARB_depth_buffer_float, GL_ARB_draw_instanced, 
    GL_ARB_half_float_vertex, GL_ARB_instanced_arrays, 
    GL_ARB_map_buffer_range, GL_ARB_texture_rg, GL_ARB_texture_swizzle, 
    GL_ARB_vertex_array_bgra, GL_EXT_separate_shader_objects, 
    GL_EXT_texture_swizzle, GL_EXT_vertex_array_bgra, 
    GL_NV_conditional_render, GL_ARB_ES2_compatibility, GL_ARB_debug_output, 
    GL_ARB_draw_elements_base_vertex, GL_ARB_explicit_attrib_location, 
    GL_ARB_fragment_coord_conventions, GL_ARB_provoking_vertex, 
    GL_ARB_sampler_objects, GL_ARB_seamless_cube_map, 
    GL_ARB_shader_texture_lod, GL_ARB_texture_rgb10_a2ui, 
    GL_EXT_provoking_vertex, GL_EXT_texture_snorm, 
    GL_MESA_texture_signed_rgba, GL_ARB_robustness, 
    GL_ARB_shader_bit_encoding, GL_ARB_texture_storage, 
    GL_ARB_invalidate_subdata

32 GLX Visuals
    visual  x   bf lv rg d st  colorbuffer  sr ax dp st accumbuffer  ms  cav
  id dep cl sp  sz l  ci b ro  r  g  b  a F gb bf th cl  r  g  b  a ns b eat
----------------------------------------------------------------------------
0x021 24 tc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x022 24 dc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x091 24 tc  0  24  0 r  . .   8  8  8  0 .  .  0  0  0  0  0  0  0  0 0 None
0x092 24 tc  0  24  0 r  y .   8  8  8  0 .  .  0  0  0  0  0  0  0  0 0 None
0x093 24 tc  0  24  0 r  y .   8  8  8  0 .  .  0  0  0  0  0  0  0  0 0 None
0x094 24 tc  0  24  0 r  . .   8  8  8  0 .  .  0 24  8  0  0  0  0  0 0 None
0x095 24 tc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8  0  0  0  0  0 0 None
0x096 24 tc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8  0  0  0  0  0 0 None
0x097 24 tc  0  32  0 r  . .   8  8  8  8 .  .  0  0  0  0  0  0  0  0 0 None
0x098 24 tc  0  32  0 r  y .   8  8  8  8 .  .  0  0  0  0  0  0  0  0 0 None
0x099 24 tc  0  32  0 r  y .   8  8  8  8 .  .  0  0  0  0  0  0  0  0 0 None
0x09a 24 tc  0  32  0 r  . .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x09b 24 tc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8  0  0  0  0  0 0 None
0x09c 24 tc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8 16 16 16  0  0 0 Slow
0x09d 24 tc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x09e 24 tc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8 16 16 16 16  0 0 Slow
0x09f 24 dc  0  24  0 r  . .   8  8  8  0 .  .  0  0  0  0  0  0  0  0 0 None
0x0a0 24 dc  0  24  0 r  y .   8  8  8  0 .  .  0  0  0  0  0  0  0  0 0 None
0x0a1 24 dc  0  24  0 r  y .   8  8  8  0 .  .  0  0  0  0  0  0  0  0 0 None
0x0a2 24 dc  0  24  0 r  . .   8  8  8  0 .  .  0 24  8  0  0  0  0  0 0 None
0x0a3 24 dc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8  0  0  0  0  0 0 None
0x0a4 24 dc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8  0  0  0  0  0 0 None
0x0a5 24 dc  0  32  0 r  . .   8  8  8  8 .  .  0  0  0  0  0  0  0  0 0 None
0x0a6 24 dc  0  32  0 r  y .   8  8  8  8 .  .  0  0  0  0  0  0  0  0 0 None
0x0a7 24 dc  0  32  0 r  y .   8  8  8  8 .  .  0  0  0  0  0  0  0  0 0 None
0x0a8 24 dc  0  32  0 r  . .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x0a9 24 dc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x0aa 24 dc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8  0  0  0  0  0 0 None
0x0ab 24 dc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8 16 16 16  0  0 0 Slow
0x0ac 24 dc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x0ad 24 dc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8 16 16 16 16  0 0 Slow
0x060 32 tc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None

48 GLXFBConfigs:
    visual  x   bf lv rg d st  colorbuffer  sr ax dp st accumbuffer  ms  cav
  id dep cl sp  sz l  ci b ro  r  g  b  a F gb bf th cl  r  g  b  a ns b eat
----------------------------------------------------------------------------
0x061  0 tc  0  16  0 r  . .   5  6  5  0 .  .  0  0  0  0  0  0  0  0 0 None
0x062  0 tc  0  16  0 r  y .   5  6  5  0 .  .  0  0  0  0  0  0  0  0 0 None
0x063  0 tc  0  16  0 r  y .   5  6  5  0 .  .  0  0  0  0  0  0  0  0 0 None
0x064  0 tc  0  16  0 r  . .   5  6  5  0 .  .  0 16  0  0  0  0  0  0 0 None
0x065  0 tc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0  0  0  0  0  0 0 None
0x066  0 tc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0  0  0  0  0  0 0 None
0x067 24 tc  0  24  0 r  . .   8  8  8  0 .  .  0  0  0  0  0  0  0  0 0 None
0x068 24 tc  0  24  0 r  y .   8  8  8  0 .  .  0  0  0  0  0  0  0  0 0 None
0x069 24 tc  0  24  0 r  y .   8  8  8  0 .  .  0  0  0  0  0  0  0  0 0 None
0x06a 24 tc  0  24  0 r  . .   8  8  8  0 .  .  0 24  8  0  0  0  0  0 0 None
0x06b 24 tc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8  0  0  0  0  0 0 None
0x06c 24 tc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8  0  0  0  0  0 0 None
0x06d 24 tc  0  32  0 r  . .   8  8  8  8 .  .  0  0  0  0  0  0  0  0 0 None
0x06e 24 tc  0  32  0 r  y .   8  8  8  8 .  .  0  0  0  0  0  0  0  0 0 None
0x06f 24 tc  0  32  0 r  y .   8  8  8  8 .  .  0  0  0  0  0  0  0  0 0 None
0x070 24 tc  0  32  0 r  . .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x071 24 tc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x072 32 tc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x073  0 tc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0  0  0  0  0  0 0 None
0x074  0 tc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0 16 16 16  0  0 0 Slow
0x075 24 tc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8  0  0  0  0  0 0 None
0x076 24 tc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8 16 16 16  0  0 0 Slow
0x077 24 tc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x078 24 tc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8 16 16 16 16  0 0 Slow
0x079  0 dc  0  16  0 r  . .   5  6  5  0 .  .  0  0  0  0  0  0  0  0 0 None
0x07a  0 dc  0  16  0 r  y .   5  6  5  0 .  .  0  0  0  0  0  0  0  0 0 None
0x07b  0 dc  0  16  0 r  y .   5  6  5  0 .  .  0  0  0  0  0  0  0  0 0 None
0x07c  0 dc  0  16  0 r  . .   5  6  5  0 .  .  0 16  0  0  0  0  0  0 0 None
0x07d  0 dc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0  0  0  0  0  0 0 None
0x07e  0 dc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0  0  0  0  0  0 0 None
0x07f 24 dc  0  24  0 r  . .   8  8  8  0 .  .  0  0  0  0  0  0  0  0 0 None
0x080 24 dc  0  24  0 r  y .   8  8  8  0 .  .  0  0  0  0  0  0  0  0 0 None
0x081 24 dc  0  24  0 r  y .   8  8  8  0 .  .  0  0  0  0  0  0  0  0 0 None
0x082 24 dc  0  24  0 r  . .   8  8  8  0 .  .  0 24  8  0  0  0  0  0 0 None
0x083 24 dc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8  0  0  0  0  0 0 None
0x084 24 dc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8  0  0  0  0  0 0 None
0x085 24 dc  0  32  0 r  . .   8  8  8  8 .  .  0  0  0  0  0  0  0  0 0 None
0x086 24 dc  0  32  0 r  y .   8  8  8  8 .  .  0  0  0  0  0  0  0  0 0 None
0x087 24 dc  0  32  0 r  y .   8  8  8  8 .  .  0  0  0  0  0  0  0  0 0 None
0x088 24 dc  0  32  0 r  . .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x089 24 dc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x08a 24 dc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x08b  0 dc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0  0  0  0  0  0 0 None
0x08c  0 dc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0 16 16 16  0  0 0 Slow
0x08d 24 dc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8  0  0  0  0  0 0 None
0x08e 24 dc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8 16 16 16  0  0 0 Slow
0x08f 24 dc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x090 24 dc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8 16 16 16 16  0 0 Slow
Attached Thumbnails
Click image for larger version

Name:	Screenshot from 2014-03-28 11:14:50.jpg
Views:	238
Size:	413.1 KB
ID:	78230  
nohal is offline   Reply With Quote
Old 28-03-2014, 18:44   #159
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: Optimized Opencpn: Testers Needed

Quote:
Originally Posted by nohal View Post
Sean...
The speed is clearly impressive. I don't currently have time to dive into the code, so just plain old user report - While zooming out with the keyboard and just the basemap, I had a few
Code:
opencpn: /home/nohal/source/opencpn/src/bbox.cpp:167: OVERLAP wxBoundingBox::Intersect(wxBoundingBox&, double): Assertion `m_validbbox == 1' failed.
Aborted
Does the program abort here? Can you set a breakpoint and give a full backtrace? Which chart? Is it one of the USA raster charts? Is this unrelated to the other problem?
Quote:
And worse, attached is what I see instead of the charts.

EDIT: The culprit is texture compression, turning it off cleans the mess up.
Is this with and without compressed caching? So when you zoom in again, the chart appears, but zooming out? Try this maybe:
Code:
diff --git a/src/glChartCanvas.cpp b/src/glChartCanvas.cpp
index 6ba5d75..39bae8a 100644
--- a/src/glChartCanvas.cpp
+++ b/src/glChartCanvas.cpp
@@ -2099,7 +2099,7 @@ void glChartCanvas::RenderRasterChartRegionGL( ChartBase *chart, ViewPort &vp, O
     //    For underzoom cases, we will define the textures as having their base levels
     //    equivalent to a level "n" mipmap, where n is calculated, and is always binary
     //    This way we can avoid loading much texture memory
-    int base_level = log(scalefactor) / log(2.0);
+    int base_level = log(scalefactor) / log(2.0) - 1;
     if(base_level < 0) /* for overzoom */
         base_level = 0;
Let me know if there is any change at all.


On another note, I found a compression scheme (lz4) which is so fast it can bring the cache size to the same as the original charts with so little cpu use that the disk is the slowing factor. So this will give an additional significant speedup as it reduces the amount of disk reading needed.
seandepagnier is offline   Reply With Quote
Old 28-03-2014, 19:27   #160
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,211
Re: Optimized Opencpn: Testers Needed

Sean...
No visible change at all applying the patch.

Re the assert:
- No charts installed at all, just the basemap
- The setting for texture caching don't matter
- I reproduce it reliably starting at 32S 47W at 1632700 scale and just holding the "-" key until the assert, which happens while getting to the smallest possible scale.

It actually might be it happens even in upstream, I have never ever done a test like this. Will debug it when I get a while - the boarding time is getting dangerously near now...

Pavel

Quote:
Originally Posted by boat_alexandra View Post
Does the program abort here? Can you set a breakpoint and give a full backtrace? Which chart? Is it one of the USA raster charts? Is this unrelated to the other problem?

Is this with and without compressed caching? So when you zoom in again, the chart appears, but zooming out? Try this maybe:
Code:
diff --git a/src/glChartCanvas.cpp b/src/glChartCanvas.cpp
index 6ba5d75..39bae8a 100644
--- a/src/glChartCanvas.cpp
+++ b/src/glChartCanvas.cpp
@@ -2099,7 +2099,7 @@ void glChartCanvas::RenderRasterChartRegionGL( ChartBase *chart, ViewPort &vp, O
     //    For underzoom cases, we will define the textures as having their base levels
     //    equivalent to a level "n" mipmap, where n is calculated, and is always binary
     //    This way we can avoid loading much texture memory
-    int base_level = log(scalefactor) / log(2.0);
+    int base_level = log(scalefactor) / log(2.0) - 1;
     if(base_level < 0) /* for overzoom */
         base_level = 0;
Let me know if there is any change at all.


On another note, I found a compression scheme (lz4) which is so fast it can bring the cache size to the same as the original charts with so little cpu use that the disk is the slowing factor. So this will give an additional significant speedup as it reduces the amount of disk reading needed.
nohal is offline   Reply With Quote
Old 29-03-2014, 03:03   #161
Registered User
 
AISEAG's Avatar

Join Date: May 2012
Location: Dahouet (Brittany)
Boat: BENETEAU
Posts: 491
Re: Optimized Opencpn: Testers Needed

Hi,

I have been using the 3.3.13034 version on a XP machine (1 Gb of RAM)

What is the latest version ?

Is there a way to get it compiled ?

Serge
AISEAG is offline   Reply With Quote
Old 29-03-2014, 04:49   #162
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: Optimized Opencpn: Testers Needed

Quote:
Originally Posted by nohal View Post
Sean...
No visible change at all applying the patch.

Re the assert:
- No charts installed at all, just the basemap
- The setting for texture caching don't matter
- I reproduce it reliably starting at 32S 47W at 1632700 scale and just holding the "-" key until the assert, which happens while getting to the smallest possible scale.

It actually might be it happens even in upstream, I have never ever done a test like this. Will debug it when I get a while - the boarding time is getting dangerously near now...

Pavel
I introduced this bug, it is fixed now.

As far as the garbage display, the compression gives garbage for the mipmap from what I can tell. This part of the code should be reworked again to give better performance anyway, currently it could be illegal.

Code:
diff --git a/src/glChartCanvas.cpp b/src/glChartCanvas.cpp
index 431e0c6..c2b77ce 100644
--- a/src/glChartCanvas.cpp
+++ b/src/glChartCanvas.cpp
@@ -189,8 +189,8 @@ static void DeleteTexture(glTextureDescriptor *ptd, int base_level)
         } else {
             /* free only unused mipmaps */
             for(int level = orig_min; level < ptd->level_min; level++)
-                glTexImage2D( GL_TEXTURE_2D, level, g_raster_format,
-                              0, 0, 0, FORMAT_BITS, GL_UNSIGNED_BYTE, NULL );
+//                glTexImage2D( GL_TEXTURE_2D, level, g_raster_format,
+//                              0, 0, 0, FORMAT_BITS, GL_UNSIGNED_BYTE, NULL );
 
             glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, ptd->level_min );
         }
@@ -216,6 +216,7 @@ wxString CompressedCachePath(const wxRect &rect, ChartBase *pchart)
 void UploadTexture( glTextureDescriptor *ptd, int base_level,
                     const wxRect &rect, ChartBase *pchart )
 {
+    base_level=0;
     if( g_bDebugOGL )
     {
         wxString msg;
seandepagnier is offline   Reply With Quote
Old 31-03-2014, 05:29   #163
Registered User
 
jonasaberg's Avatar

Join Date: Jul 2008
Location: Kristiansand, Norway
Boat: Wasa 410
Posts: 309
Re: Optimized Opencpn: Testers Needed

Is it to early to try to make this optimized version run on a RaspberryPi?
jonasaberg is offline   Reply With Quote
Old 31-03-2014, 07:52   #164
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: Optimized Opencpn: Testers Needed

It is not too early if you are willing to merge this with the work manuel bachmann has done with my branch to get opencpn to run with hardware accelerated opengles as this is supported by all the arm platforms.

Eventually I will try, but I still have no display for my raspberry pi or cubie truck. I can say that it will likely run plenty fast enough for general use (using compressed chart caching) even if the charts are loaded from an sd card. There are more advanced compression extensions for mobile gpus than what I have in my chromebook which require only 1 line of code change to use, which would cut memory and disk usage in half and double performance again.
seandepagnier is offline   Reply With Quote
Old 31-03-2014, 10:50   #165
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 4,150
Re: Optimized Opencpn: Testers Needed

Sean..or anyone
Please teach me how to clone your branch "optimum"?
I suppose it's not merged into the "github.com/seandepagnier/OpenCPN"

Thanks/ HÅkan
Hakan is offline   Reply With Quote
Reply

Tags
opencpn, enc


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


Advertise Here


All times are GMT -7. The time now is 05:47.


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.