From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p3QJdOFi008911 for ; Tue, 26 Apr 2011 21:39:26 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsYEAHwet03RVdY2kGdsb2JhbACYNo0mCBQBAQEBCQkNBxQEIYhwojGKeIInhUc0iF4BAQMGhXAEhXeISoQMgQeFBDqDUg X-IronPort-AV: E=Sophos;i="4.64,270,1301868000"; d="scan'208";a="106858936" Received: from mail-bw0-f54.google.com ([209.85.214.54]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 26 Apr 2011 21:39:26 +0200 Received: by bwz12 with SMTP id 12so1673178bwz.27 for ; Tue, 26 Apr 2011 12:39:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; bh=+ZeE/GA5GScwcl3Z/IUIMP8nROM032+BzgZ7Mtm+vhA=; b=NeTDJ6YtZcxWzBeQVGpBKE3BR8KFWizoC6LRGWa5Jak/MqmT0kNhq4Nyb6JsGQHkhD Gc1idS8XZjWMjRAnl0OufOHyqr3MtzpLVlXmlN2czb9GYk5MHmZdeCMBCetXVWv5MIEN JbUnmj8of2Gj96VcHXuy6iNAeZxGB98k7n75o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=cDXA6vhJ2qn+6wna8T7/WZtelkRcc1uhc1+mqGpxnf2pwmMK37rFB8Am25m1nsvQSo 3n3MOqPNswDhUn0M8X9LqQU1xeeJNqrIIE3hlxdotbn9HUOpiaXKWTQSWMLw4mT03SW4 3gnWT2HGyvsEVcwzE7PIKpD+fJgFqH3H8todA= Received: by 10.204.47.77 with SMTP id m13mr1122029bkf.67.1303846765416; Tue, 26 Apr 2011 12:39:25 -0700 (PDT) Received: from [192.168.1.117] ([79.114.61.49]) by mx.google.com with ESMTPS id f21sm19223bkd.23.2011.04.26.12.39.17 (version=SSLv3 cipher=OTHER); Tue, 26 Apr 2011 12:39:21 -0700 (PDT) Message-ID: <4DB71F64.7030501@gmail.com> Date: Tue, 26 Apr 2011 22:39:16 +0300 From: =?ISO-8859-1?Q?T=F6r=F6k_Edwin?= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110402 Icedove/3.1.9 MIME-Version: 1.0 To: caml-list@inria.fr References: In-Reply-To: X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Caml-list] f#/mono vs ocaml runtime system - open gl animation screen tearing. On 04/26/2011 10:15 PM, Peter Ronnquist wrote: > Hi all, > > I have been experimenting with f# and mono on debian linux and > compared it with ocaml. > I am interested in visual presentations for example games and in my > tests f# + mono + opentk was able to make completely smooth animations > using opengl (opentk) on debian 6.0 (squeeze). > > Ocaml + lablgl gives "stutters" in the animation within the period of > a couple of seconds. The animation runs smooth for a couple of seconds > and then the animation update is disturbed with the result that the > image is "teared". The tearing lasts only for a fraction of second but > is visible for a trained eye. Did you try to synchronize to VSYNC? Also which OpenGL drivers are you using, some older versions of the Intel drivers used to have quite significant tearing even with 2D animations/video. > > I suspected that the GC could be a cause for this and I tried to > manipulate the GC settings but I could not get a completely smooth > animation for a longer period of time. > > This is completely acceptable for many applications but for making a > game or for the meticulous graphical applicaton user it is not ideal. > > My thought is that maybe f#/mono unboxes more values than ocaml and in > this way the GC doesn't need to work as hard? Try 'latencytop', and 'perf record/perf report' to see where time is spent. > > My question really is if you think it is worthwhile to investigate the > runtime system for mono and compare it with the runtime system for > ocaml to locate the differences that might influence the animation and > then even update the ocaml runtime system to use a similar strategy > as the f# runtime system? Do you have a simple testcase? (OCaml code vs Mono code that easily reproduces the issue?) Best regards, --Edwin