These are chat archives for AvaloniaUI/Avalonia

14th
Feb 2018
jp2masa
@jp2masa
Feb 14 2018 02:02
using the latest nightly packages, I'm getting this exception:
System.ObjectDisposedException
  HResult=0x80131622
  Message=Cannot access a disposed object.
  Source=Avalonia.Base
  StackTrace:
   at Avalonia.Utilities.RefCountable.Ref`1.Clone()
   at Avalonia.Rendering.SceneGraph.VisualNode.Clone(IVisualNode parent)
   at Avalonia.Rendering.SceneGraph.Scene.Clone(VisualNode source, IVisualNode parent, Dictionary`2 index)
   at Avalonia.Rendering.SceneGraph.Scene.Clone(VisualNode source, IVisualNode parent, Dictionary`2 index)
   at Avalonia.Rendering.SceneGraph.Scene.Clone(VisualNode source, IVisualNode parent, Dictionary`2 index)
   at Avalonia.Rendering.SceneGraph.Scene.Clone(VisualNode source, IVisualNode parent, Dictionary`2 index)
   at Avalonia.Rendering.SceneGraph.Scene.Clone(VisualNode source, IVisualNode parent, Dictionary`2 index)
   at Avalonia.Rendering.SceneGraph.Scene.Clone(VisualNode source, IVisualNode parent, Dictionary`2 index)
   at Avalonia.Rendering.SceneGraph.Scene.Clone(VisualNode source, IVisualNode parent, Dictionary`2 index)
   at Avalonia.Rendering.SceneGraph.Scene.Clone(VisualNode source, IVisualNode parent, Dictionary`2 index)
   at Avalonia.Rendering.SceneGraph.Scene.Clone(VisualNode source, IVisualNode parent, Dictionary`2 index)
   at Avalonia.Rendering.SceneGraph.Scene.Clone(VisualNode source, IVisualNode parent, Dictionary`2 index)
   at Avalonia.Rendering.SceneGraph.Scene.CloneScene()
   at Avalonia.Rendering.DeferredRenderer.UpdateScene()
   at Avalonia.Threading.JobRunner.RunJobs(Nullable`1 priority)
   at Avalonia.Win32.Win32Platform.WndProc(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam)
   at Avalonia.Win32.Interop.UnmanagedMethods.DispatchMessage(MSG& lpmsg)
   at Avalonia.Win32.Win32Platform.RunLoop(CancellationToken cancellationToken)
   at Avalonia.Threading.Dispatcher.MainLoop(CancellationToken cancellationToken)
   at MyApp.App.Main(String[] args) in path\to\App.xaml.cs:line 24
Jeremy Koritzinsky
@jkoritzinsky
Feb 14 2018 02:10
@jp2masa can you post a repro?
@grokys I think we should punt all the remaining issues in pre-beta and the beta 1 milestone.
Nikita Tsukanov
@kekekeks
Feb 14 2018 05:58
@galvesribeiro we aren't updating SkiaSharp since updating it means rebuilding our portable linux binary
Which, as you know, is a huge pain in the rear
You should be able to update SkiaSharp manually for your particular project
goebeler
@goebeler
Feb 14 2018 08:53
Hi, just a quick question. Can anyone tell me if there are known issues when using avalonia in combination with any other rendering API? Especially OpenGL and Vulkan?
Chris Pie
@kpietraszko
Feb 14 2018 11:15
@jp2masa I also get this one randomly, hard to reproduce
Steven Kirk
@grokys
Feb 14 2018 12:53
@jp2masa @kpietraszko hmm that should have been fixed by AvaloniaUI/Avalonia#1365
i.e. Avalonia.0.5.2-build4541-alpha- are you on a lower version than that?
Gutemberg Ribeiro
@galvesribeiro
Feb 14 2018 12:57
Ob
Avalonia has native library?
Do I meed to build that?
Matthijs ter Woord
@mterwoord
Feb 14 2018 13:07
what native library?
Gutemberg Ribeiro
@galvesribeiro
Feb 14 2018 13:22
wait I was awaking when I wrote that...
blob
ok, I'm not crazy heheheh
so no, I can't upgrade the skiasharp package because the avalonia one has constraint it to a specific vervsion
Matthijs ter Woord
@mterwoord
Feb 14 2018 13:24
correct
not sure why avalonia uses a custom built, but i'm pretty sure there's a good reason for that..
Gutemberg Ribeiro
@galvesribeiro
Feb 14 2018 13:24
me too
for example
Skia will deprecate SkBitmap if I understood correctly... and there are usages of it on Avalonia
the major problem for me now is that I can't get the new Skia to run on the device
Matthijs ter Woord
@mterwoord
Feb 14 2018 13:26
:(
Gutemberg Ribeiro
@galvesribeiro
Feb 14 2018 13:29
I wish I could find someone to hire to build it...
Matthijs ter Woord
@mterwoord
Feb 14 2018 13:30
:)
Gutemberg Ribeiro
@galvesribeiro
Feb 14 2018 13:49
@kekekeks is there any chances we could revive the cairo backend to use only with the framebuffer?
galvesribeiro @galvesribeiro desperated
Chris Pie
@kpietraszko
Feb 14 2018 14:15
@grokys you're right, I'm on lower version. I've now updated to most recent nightly but this exception still happens. Try opening devtools, holding ctrl+shift and hovering over various controls.
Steven Kirk
@grokys
Feb 14 2018 14:16
hmm, sounds like we still have a bug there then @jkoritzinsky
Chris Pie
@kpietraszko
Feb 14 2018 14:20
Happens on both ControlCatalog.NetCore and .Desktop
Jeremy Koritzinsky
@jkoritzinsky
Feb 14 2018 15:13
I'll mess around with it. Probably another race condition.
Jeremy Koritzinsky
@jkoritzinsky
Feb 14 2018 17:48
@kekekeks SkiaSharp now ships with the native library in-package for the linux-x64 RID. Any reason we couldn't use their build?
Gutemberg Ribeiro
@galvesribeiro
Feb 14 2018 18:24
ok, thanks to @jakesays I was saved from the damn asm() calls from Skia
now I have Skia working
when I try to run avalonia, it complains about missing native methods exported
I believe it is a version missmatch here
trying to investigate that
@jkoritzinsky I believe the problem is not just SkiaSharp native. What @kekekeks refered is that Avalonia itself has a native linux library which is linked to SkiaSharp native libraries... so whenever they change that library, Avalonia has to compile their own as well
Unhandled Exception:
System.EntryPointNotFoundException: sk_bitmap_copy
  at (wrapper managed-to-native) SkiaSharp.SkiaApi.sk_bitmap_copy(intptr,intptr,SkiaSharp.SKColorType)
  at SkiaSharp.SKBitmap.Copy (SkiaSharp.SKColorType colorType) [0x00012] in <cf546bad13294f0f88da02ef9d3e7062>:0
  at Avalonia.Skia.FramebufferRenderTarget+PixelFormatShim.Dispose () [0x00015] in <d5b69c30152349b08fc00ee9cbd61cd9>:0   at Avalonia.Skia.DrawingContextImpl.Dispose () [0x00023] in <d5b69c30152349b08fc00ee9cbd61cd9>:0
  at Avalonia.Media.DrawingContext.Dispose () [0x0005f] in <d7c7eccd3ad9432e857a311635580d9d>:0
  at Avalonia.Rendering.ImmediateRenderer.Paint (Avalonia.Rect rect) [0x000db] in <d7c7eccd3ad9432e857a311635580d9d>:0
  at Avalonia.Controls.TopLevel.HandlePaint (Avalonia.Rect rect) [0x0000b] in <7b03e24a0146413c8d34bb6dc2d4eb84>:0
  at Avalonia.LinuxFramebuffer.FramebufferToplevelImpl.<Invalidate>b__9_0 () [0x00021] in <471ad4c39a0e484d99196f0e659bb8c2>:0
  at Avalonia.Threading.JobRunner.RunJobs (System.Nullable`1[T] priority) [0x00042] in <4af0fa7ae6bc4baea492b767723232be>:0
  at Avalonia.Controls.Platform.InternalPlatformThreadingInterface.RunLoop (System.Threading.CancellationToken cancellationToken) [0x00037] in <7b03e24a0146413c8d34bb6dc2d4eb84>:0
  at Avalonia.Threading.Dispatcher.MainLoop (System.Threading.CancellationToken cancellationToken) [0x0002b] in <4af0fa7ae6bc4baea492b767723232be>:0
  at Avalonia.Application.Run (Avalonia.Input.ICloseable closable) [0x00049] in <7b03e24a0146413c8d34bb6dc2d4eb84>:0
  at LinuxFramebufferPlatformExtensions.InitializeWithLinuxFramebuffer[T] (T builder, System.Action`1[T] setup, System.Threading.CancellationToken stop, System.String fbdev) [0x00032] in <471ad4c39a0e484d99196f0e659bb8c2>:0
  at HelloPOS.Program.Main () [0x00027] in <d96962a0b54c4061a6906637696660d8>:0
for example
Big Jake
@jakesays
Feb 14 2018 18:36
@mterwoord i'd like to know more about your rpi3 work
Jeremy Koritzinsky
@jkoritzinsky
Feb 14 2018 18:59
@galvesribeiro We supply our own native Skia builds. We don't have any native code for Avalonia since we transitioned over to SkiaSharp.
Gutemberg Ribeiro
@galvesribeiro
Feb 14 2018 18:59
ahhh ok
I thought Avalonia had a native bin depending on skia
in that case, you are right... I think there is no need to build anymore and just use whatever SkiaSharp is pushed
then people (like myself) who want custom builds, can do it and just remove the MSBuild target that makes the copy of the native binary to the output
danwalmsley
@danwalmsley
Feb 14 2018 19:05
@jkoritzinsky we only built libskia and libskiasharp ourselves because Skia sharp didn't ship a linux build previously
If they do now, we would be best to use that
Jeremy Koritzinsky
@jkoritzinsky
Feb 14 2018 19:14
Looks like it's not shipping with it yet, but it's in their repo
So once SkiaSharp 1.60.0 is released, we can upgrade and not have to supply our own builds.
Gutemberg Ribeiro
@galvesribeiro
Feb 14 2018 19:18
good
Big Jake
@jakesays
Feb 14 2018 19:31
actually there is a compelling use case for having an out of repo build
especially coupled with .net core.
Gutemberg Ribeiro
@galvesribeiro
Feb 14 2018 19:39
BC396BC8-A0B4-4BF0-BD3F-548A45D504D9.jpg
Avalonia running on my device :)
it is supposed to draw
<UserControl xmlns="https://github.com/avaloniaui" Width="320" Height="240">
    <TextBlock>Hello world!</TextBlock> 
</UserControl>
hehehe
pretty sure it is some config on framebuffer code
sorry, the skia code
it should be using some unsupported collor mode
and it after a while also crash:
Unhandled Exception:
System.DllNotFoundException: libevdev.so.2
  at (wrapper managed-to-native) Avalonia.LinuxFramebuffer.NativeUnsafeMethods.libevdev_new_from_fd(int,intptr&)
  at Avalonia.LinuxFramebuffer.EvDevDevice.Open (System.String device) [0x00034] in <471ad4c39a0e484d99196f0e659bb8c2>:0
  at System.Linq.Enumerable+SelectArrayIterator`2[TSource,TResult].MoveNext () [0x0003a] in <b0fca80f08474611b248e2d30bb75230>:0
  at Avalonia.LinuxFramebuffer.EvDevDevice.OpenMouseDevices () [0x0005c] in <471ad4c39a0e484d99196f0e659bb8c2>:0
  at Avalonia.LinuxFramebuffer.EvDevDevice+<>c.<.cctor>b__26_0 () [0x00000] in <471ad4c39a0e484d99196f0e659bb8c2>:0
  at System.Lazy`1[T].CreateValue () [0x00081] in <2e7c1c96edae44d496118948ca617c11>:0
  at System.Lazy`1[T].LazyInitValue () [0x00080] in <2e7c1c96edae44d496118948ca617c11>:0
  at System.Lazy`1[T].get_Value () [0x0003a] in <2e7c1c96edae44d496118948ca617c11>:0
  at Avalonia.LinuxFramebuffer.EvDevDevice.get_MouseDevices () [0x00000] in <471ad4c39a0e484d99196f0e659bb8c2>:0
  at Avalonia.LinuxFramebuffer.Mice.Worker () [0x00001] in <471ad4c39a0e484d99196f0e659bb8c2>:0
  at Avalonia.Shared.PlatformSupport.StandardRuntimePlatform+<>c__DisplayClass4_0.<PostThreadPoolItem>b__0 (System.Object _) [0x00000] in <ab4febb585d04b7aa9fc7c5765568c1f>:0
  at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () [0x00008] in <2e7c1c96edae44d496118948ca617c11>:0
  at System.Threading.ThreadPoolWorkQueue.Dispatch () [0x00074] in <2e7c1c96edae44d496118948ca617c11>:0
  at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () [0x00000] in <2e7c1c96edae44d496118948ca617c11>:0
Big Jake
@jakesays
Feb 14 2018 19:45
huh. its interesting that the framebuffer is also handling input.
thats probably not the best design
Big Jake
@jakesays
Feb 14 2018 19:51
@galvesribeiro you'll probably have to build a libevdev.so
Gutemberg Ribeiro
@galvesribeiro
Feb 14 2018 19:52
looks like
I hope it don't be a pain
now I'm trying to fix the color issue on avalonia/skia
Big Jake
@jakesays
Feb 14 2018 19:52
if the input system were separate you could just reimplement it
Gutemberg Ribeiro
@galvesribeiro
Feb 14 2018 19:52
agree
Gutemberg Ribeiro
@galvesribeiro
Feb 14 2018 20:30
foudn the color issue
            if (runtime?.IsDesktop == true && runtime?.OperatingSystem == OperatingSystemType.Linux)
                colorType = SKColorType.Bgra8888;
and
Bitmap =  new SKBitmap(width, height, colorType, SKAlphaType.Premul);
my direct test to skia that draw properly use this:
     var imgInfo = new SKImageInfo(_fb.ScreenWidth, _fb.ScreenHeight, SKColorType.Rgb565, SKAlphaType.Unpremul);
Gutemberg Ribeiro
@galvesribeiro
Feb 14 2018 21:03
Unhandled Exception:
System.Exception: Unable to open /dev/input/event1 code 13
  at Avalonia.LinuxFramebuffer.EvDevDevice.Open (System.String device) [0x00026] in <c7c3aa00ddaa4a3880fce76465f7abd4>:0
  at System.Linq.Enumerable+SelectArrayIterator`2[TSource,TResult].MoveNext () [0x0003a] in <b0fca80f08474611b248e2d30bb75230>:0
  at Avalonia.LinuxFramebuffer.EvDevDevice.OpenMouseDevices () [0x00052] in <c7c3aa00ddaa4a3880fce76465f7abd4>:0
  at Avalonia.LinuxFramebuffer.EvDevDevice+<>c.<.cctor>b__26_0 () [0x00000] in <c7c3aa00ddaa4a3880fce76465f7abd4>:0
  at System.Lazy`1[T].CreateValue () [0x00081] in <2e7c1c96edae44d496118948ca617c11>:0
  at System.Lazy`1[T].LazyInitValue () [0x00080] in <2e7c1c96edae44d496118948ca617c11>:0
  at System.Lazy`1[T].get_Value () [0x0003a] in <2e7c1c96edae44d496118948ca617c11>:0
  at Avalonia.LinuxFramebuffer.EvDevDevice.get_MouseDevices () [0x00000] in <c7c3aa00ddaa4a3880fce76465f7abd4>:0
  at Avalonia.LinuxFramebuffer.Mice.Worker () [0x00000] in <c7c3aa00ddaa4a3880fce76465f7abd4>:0
  at Avalonia.Shared.PlatformSupport.StandardRuntimePlatform+<>c__DisplayClass4_0.<PostThreadPoolItem>b__0 (System.Object _) [0x00000] in <0c13b413c4e74042857b6abfae6c3717>:0
  at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () [0x00008] in <2e7c1c96edae44d496118948ca617c11>:0
  at System.Threading.ThreadPoolWorkQueue.Dispatch () [0x00074] in <2e7c1c96edae44d496118948ca617c11>:0
  at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () [0x00000] in <2e7c1c96edae44d496118948ca617c11>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.Exception: Unable to open /dev/input/event1 code 13
  at Avalonia.LinuxFramebuffer.EvDevDevice.Open (System.String device) [0x00026] in <c7c3aa00ddaa4a3880fce76465f7abd4>:0
yeah... the input is being hardcoded :(
I mean, the discovery logic implemented doesn't cover all scenarios... so for embedded scenarios, it should allow us to specify which /dev/input to use
at least the fix is not complicated... I still have issues with the colors
Gutemberg Ribeiro
@galvesribeiro
Feb 14 2018 21:53
great! Avalonia requires reflection_emit :(
This mono runtime was configured with --enable-minimal=reflection_emit, so System.Reflection.Emit is not supported.
Stacktrace:

  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) System.Reflection.Emit.AssemblyBuilder.basic_init (System.Reflection.Emit.AssemblyBuild
er) <0x00037>
  at System.Reflection.Emit.AssemblyBuilder..ctor (System.Reflection.AssemblyName,string,System.Reflection.Emit.Assembly
BuilderAccess,bool) [0x001f7] in <2e7c1c96edae44d496118948ca617c11>:0
  at System.AppDomain.DefineDynamicAssembly (System.Reflection.AssemblyName,System.Reflection.Emit.AssemblyBuilderAccess
,string,System.Security.Policy.Evidence,System.Security.PermissionSet,System.Security.PermissionSet,System.Security.Perm
issionSet,bool) [0x00019] in <2e7c1c96edae44d496118948ca617c11>:0
  at (wrapper remoting-invoke-with-check) System.AppDomain.DefineDynamicAssembly (System.Reflection.AssemblyName,System.
Reflection.Emit.AssemblyBuilderAccess,string,System.Security.Policy.Evidence,System.Security.PermissionSet,System.Securi
ty.PermissionSet,System.Security.PermissionSet,bool) [0x0003e] in <2e7c1c96edae44d496118948ca617c11>:0
  at System.AppDomain.DefineDynamicAssembly (System.Reflection.AssemblyName,System.Reflection.Emit.AssemblyBuilderAccess
) [0x00000] in <2e7c1c96edae44d496118948ca617c11>:0
  at (wrapper remoting-invoke-with-check) System.AppDomain.DefineDynamicAssembly (System.Reflection.AssemblyName,System.
Reflection.Emit.AssemblyBuilderAccess) [0x00033] in <2e7c1c96edae44d496118948ca617c11>:0
  at System.Reflection.Emit.DynamicMethod/AnonHostModuleHolder..cctor () [0x00016] in <2e7c1c96edae44d496118948ca617c11>
:0
  at (wrapper runtime-invoke) object.runtime_invoke_void (object,intptr,intptr,intptr) [0x0001e] in <2e7c1c96edae44d4961
18948ca617c11>:0
  at <unknown> <0xffffffff>
  at System.Reflection.Emit.DynamicMethod..ctor (string,System.Reflection.MethodAttributes,System.Reflection.CallingConv
entions,System.Type,System.Type[],System.Type,System.Reflection.Module,bool,bool) [0x000d3] in <2e7c1c96edae44d496118948
ca617c11>:0
  at System.Reflection.Emit.DynamicMethod..ctor (string,System.Type,System.Type[],bool) [0x00000] in <2e7c1c96edae44d496
118948ca617c11>:0
  at System.Linq.Expressions.Compiler.LambdaCompiler..ctor (System.Linq.Expressions.Compiler.AnalyzedTree,System.Linq.Ex
pressions.LambdaExpression) [0x0005a] in <b0fca80f08474611b248e2d30bb75230>:0
  at System.Linq.Expressions.Compiler.LambdaCompiler.Compile (System.Linq.Expressions.LambdaExpression) [0x00007] in <b0
fca80f08474611b248e2d30bb75230>:0
  at System.Linq.Expressions.Expression`1<TDelegate_REF>.Compile (bool) [0x00000] in <b0fca80f08474611b248e2d30bb75230>:
0
  at System.Linq.Expressions.Expression`1<TDelegate_REF>.Compile () [0x00000] in <b0fca80f08474611b248e2d30bb75230>:0
  at Portable.Xaml.MemberExpressionExtensions.BuildCall2Expression (System.Reflection.MethodInfo) [0x00164] in <0942b633
f6dd48f3aa134f55633316db>:0
  at Portable.Xaml.Schema.XamlTypeInvoker/<>c__DisplayClass20_1.<AddToDictionary>b__1 () [0x00000] in <0942b633f6dd48f3a
a134f55633316db>:0
  at System.Threading.Tasks.Task`1<TResult_REF>.InnerInvoke () [0x0000f] in <2e7c1c96edae44d496118948ca617c11>:0
  at System.Threading.Tasks.Task.Execute () [0x00010] in <2e7c1c96edae44d496118948ca617c11>:0
  at System.Threading.Tasks.Task.ExecutionContextCallback (object) [0x00000] in <2e7c1c96edae44d496118948ca617c11>:0
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,o
bject,bool) [0x00071] in <2e7c1c96edae44d496118948ca617c11>:0
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bo
ol) [0x00000] in <2e7c1c96edae44d496118948ca617c11>:0
  at System.Threading.Tasks.Task.ExecuteWithThreadLocal (System.Threading.Tasks.Task&) [0x00050] in <2e7c1c96edae44d4961
18948ca617c11>:0
  at System.Threading.Tasks.Task.ExecuteEntry (bool) [0x00058] in <2e7c1c96edae44d496118948ca617c11>:0
  at System.Threading.Tasks.Task.System.Threading.IThreadPoolWorkItem.Execute
galvesribeiro @galvesribeiro building mono again...
Jeremy Koritzinsky
@jkoritzinsky
Feb 14 2018 22:00
@jp2masa @grokys I think I've gotten the ref-counting exception fixed. Take a look at #1371.
Gutemberg Ribeiro
@galvesribeiro
Feb 14 2018 22:04
@kekekeks in the framebuffer implementation where does it pass the screen width/height to skia so it can create the bitmap?
I have 2 problems now:
  1. The color schema(SkColorType and SKAlphaType) Avalonia is using is not the one supported by the device
  2. The device width/height are not properly being set, so I guess it is not calculating the proper size for the buffer to draw
ah!
  1. There is no way to infor to Avalonia whether this device has or not the display rotated (common for embedded devices which reuse the same display on multiple products)
the color problem and the size can be fixed if I found out where to do something like this:
var imgInfo = new SKImageInfo(_fb.ScreenWidth, _fb.ScreenHeight, SKColorType.Rgb565, SKAlphaType.Unpremul);
Gutemberg Ribeiro
@galvesribeiro
Feb 14 2018 22:09
The rotation is also easy to fix... If I find where it is creating the canvas for the screen, soemthing like this would work:
    if (_fb.RotateDegrees > 0)
                {
                    _canvas.RotateDegrees(_fb.RotateDegrees);
                    _canvas.Translate(0, -_fb.ScreenWidth);
                }
can you point me to the right place? (or someone else familiar with the skia backend)
jp2masa
@jp2masa
Feb 14 2018 22:13
@jkoritzinsky it's working perfectly now, thanks for the fix
Gutemberg Ribeiro
@galvesribeiro
Feb 14 2018 23:08
/data/opt/Release $ ./test
Hello World!
Running the static method: HelloPOS.Program:Main
Theme loaded DefaultTheme
Fontconfig error: Cannot load default config file
Killed
regardless of the color/rotation...
Avalonia for a hello world uses 161mb ram
the OS eventually kill it
galvesribeiro @galvesribeiro cry
Steven Kirk
@grokys
Feb 14 2018 23:27
161mb!! ouch
i wonder why that is?
can you tell how much of that is managed vs unmanaged memory?
Gutemberg Ribeiro
@galvesribeiro
Feb 14 2018 23:31
humm
how could I check that @grokys
I only got a top
IMG_14022018_210600_0.png
Steven Kirk
@grokys
Feb 14 2018 23:32
hmm not sure tbh - i use dotmemory but that won't help you i don't think!
Gutemberg Ribeiro
@galvesribeiro
Feb 14 2018 23:33
not to mention there are tons of thread contention due to tons of statics I guess
and context switch
the CPU gets very high because of it
Steven Kirk
@grokys
Feb 14 2018 23:34
why would statics cause thread contention?
Gutemberg Ribeiro
@galvesribeiro
Feb 14 2018 23:34
if there are locks() or if it is being marshalled back and forward somehow to native world
but the lock is not the problem
the problem is the memory usage
it is unreasobale to use on that device
Steven Kirk
@grokys
Feb 14 2018 23:35
are you on mono or net core?
Gutemberg Ribeiro
@galvesribeiro
Feb 14 2018 23:35
mono
I can't run .net core on the device
RyuJIT requires FPU available only on armv7+
I'm on armv6 on that device
Steven Kirk
@grokys
Feb 14 2018 23:36
looks like there's a --profile option to mono: http://www.mono-project.com/docs/advanced/performance-tips/
we are very unoptimized at this point though
Gutemberg Ribeiro
@galvesribeiro
Feb 14 2018 23:37
I disabled profile on my mono build to reduce size
let me rebuild it with profile enabled
Steven Kirk
@grokys
Feb 14 2018 23:38
i have a branch i was working on which reduced managed memory size a fair bit, but i hit a problem with it
though without knowing how much is managed vs unmanaged it's hard to say what the problem is
Gutemberg Ribeiro
@galvesribeiro
Feb 14 2018 23:39
sure
let me build the mono with profile
will ping u back soon