<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7556585108877163335</id><updated>2024-09-13T15:07:34.744+03:00</updated><category term="Jint"/><category term="Performance"/><category term="Quartz.NET"/><category term="Docker"/><category term="LINQ"/><category term="WSL2"/><title type='text'>Marko Lahma&#39;s Blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.lahma.net/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7556585108877163335/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://blog.lahma.net/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Marko Lahma</name><uri>http://www.blogger.com/profile/11287923061418676026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>12</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7556585108877163335.post-3265062353125158518</id><published>2019-08-01T11:50:00.000+03:00</published><updated>2019-08-05T09:27:14.605+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Docker"/><category scheme="http://www.blogger.com/atom/ns#" term="WSL2"/><title type='text'>Running docker-compose against WSL2 </title><content type='html'>Just adding a quick note for myself here. I wanted to run against docker host on WSL2 and docker compose connects to DockerDesktopVM instance by default (the full virtual machine). What I wanted to try is to run Docker Compose experience without the virtual machine utilizing the new WSL2 capabilities.&lt;br /&gt;
&lt;br /&gt;
Scott Hanselman has &lt;a href=&quot;https://www.hanselman.com/blog/DockerDesktopForWSL2IntegratesWindows10AndLinuxEvenCloser.aspx&quot;&gt;a good write-up&lt;/a&gt; about this feature.
&lt;br /&gt;
&lt;h3&gt;
Prequisities&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Windows 10 insider build from the fast ring (at the time of writing), build 18932 or newer&lt;/li&gt;
&lt;li&gt;&lt;code style=&quot;background-color: #eeeeee;&quot;&gt;Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Install Ubuntu 18.04 from Windows Store, ensure it has the correct WSL version&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code style=&quot;background-color: #eeeeee;&quot;&gt;wsl --set-version Ubuntu-18.04 2&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;To make life easier, make the new version default&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code style=&quot;background-color: #eeeeee;&quot;&gt;wsl --set-default-version 2&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Install &lt;a href=&quot;https://docs.docker.com/docker-for-windows/wsl-tech-preview/&quot;&gt;Docker Desktop WSL 2 Technical Preview&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
Run docker-compose targeting the Linux WSL2 docker host&lt;/h3&gt;
The key is to use the -H parameter, when you are hosting both the Virtual Machine and lightweight WSL2 version.&lt;br /&gt;
&lt;br /&gt;
&lt;code style=&quot;background-color: #eeeeee;&quot;&gt;
   docker-compose -H &quot;npipe:////./pipe/docker_wsl&quot; up -d
&lt;/code&gt;
&lt;br /&gt;
&lt;br /&gt;
And now my containers managed by compose are running under the lightweight WSL2 model. The full-blown Docker virtual machine can be shutdown while using in this WSL2 mode.
&lt;br /&gt;
&lt;br /&gt;
If you want permanently target the WSL2 engine, you can also set environment variable &lt;strong&gt;DOCKER_HOST&lt;/strong&gt; to point to this npipe protocol address.
</content><link rel='replies' type='application/atom+xml' href='http://blog.lahma.net/feeds/3265062353125158518/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.lahma.net/2019/08/running-docker-compose-against-wsl2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7556585108877163335/posts/default/3265062353125158518'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7556585108877163335/posts/default/3265062353125158518'/><link rel='alternate' type='text/html' href='http://blog.lahma.net/2019/08/running-docker-compose-against-wsl2.html' title='Running docker-compose against WSL2 '/><author><name>Marko Lahma</name><uri>http://www.blogger.com/profile/11287923061418676026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7556585108877163335.post-9171106386260663144</id><published>2018-12-06T22:59:00.001+02:00</published><updated>2018-12-06T22:59:33.960+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Jint"/><category scheme="http://www.blogger.com/atom/ns#" term="Performance"/><title type='text'>Optimizing Jint part 7: Rewriting the interpreter</title><content type='html'>So when you start to hit the wall trying to get things faster using the current infrastructure, you can always level the playing field by re-thinking the problem and finding a better way to approach the problem. A recent big change was to refactor how the JavaScript AST tree is being interpreted.&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://blog.lahma.net/2018/12/optimizing-jint-part-7-rewriting.html#more&quot;&gt;Read more »&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.lahma.net/feeds/9171106386260663144/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.lahma.net/2018/12/optimizing-jint-part-7-rewriting.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7556585108877163335/posts/default/9171106386260663144'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7556585108877163335/posts/default/9171106386260663144'/><link rel='alternate' type='text/html' href='http://blog.lahma.net/2018/12/optimizing-jint-part-7-rewriting.html' title='Optimizing Jint part 7: Rewriting the interpreter'/><author><name>Marko Lahma</name><uri>http://www.blogger.com/profile/11287923061418676026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7556585108877163335.post-75185257999026641</id><published>2018-11-15T12:00:00.000+02:00</published><updated>2018-11-15T20:10:11.727+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Jint"/><category scheme="http://www.blogger.com/atom/ns#" term="Performance"/><title type='text'>Optimizing Jint part 6: DictionarySlim is coming to town</title><content type='html'>The past weekend I read about an interesting &lt;a href=&quot;https://github.com/dotnet/corefxlab/pull/2458&quot;&gt;pull request&lt;/a&gt; which is bringing a new type of dictionary with great interest. The &lt;a href=&quot;https://github.com/dotnet/corefxlab/issues/2428&quot;&gt;idea of creating a new, simpler and enhanced version&lt;/a&gt;, now called DictionarySlim, original spun from the famous &lt;a href=&quot;https://benchmarksgame-team.pages.debian.net/benchmarksgame/performance/knucleotide.html&quot;&gt;k-nucleotide benchmark&lt;/a&gt; where .NET had some trouble performing well with the built-in Dictionary&lt;tkey tvalue=&quot;&quot;&gt;. What is this new member in *Slim family?&lt;/tkey&gt;&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://blog.lahma.net/2018/11/optimizing-jint-part-6-dictionaryslim.html#more&quot;&gt;Read more »&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.lahma.net/feeds/75185257999026641/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.lahma.net/2018/11/optimizing-jint-part-6-dictionaryslim.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7556585108877163335/posts/default/75185257999026641'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7556585108877163335/posts/default/75185257999026641'/><link rel='alternate' type='text/html' href='http://blog.lahma.net/2018/11/optimizing-jint-part-6-dictionaryslim.html' title='Optimizing Jint part 6: DictionarySlim is coming to town'/><author><name>Marko Lahma</name><uri>http://www.blogger.com/profile/11287923061418676026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7556585108877163335.post-345216043690603519</id><published>2018-11-02T12:00:00.000+02:00</published><updated>2018-11-02T19:05:48.668+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Jint"/><category scheme="http://www.blogger.com/atom/ns#" term="Performance"/><title type='text'>Optimizing Jint part 5: Optimizing Javascript primitives</title><content type='html'>&lt;h3&gt;
Javascript primitives in Jint&lt;/h3&gt;
&lt;div&gt;
Jint has abstraction for each primitive Javascript type. Having these fundamental types work and interact with the engine in efficient manner is crucial for good performance.&lt;br&gt;
&lt;br&gt;
In this blog post we are investigating some of them and problems I found while profiling.&lt;br&gt;
&lt;/div&gt;&lt;a href=&quot;http://blog.lahma.net/2018/11/optimizing-jint-part-5-optimizing.html#more&quot;&gt;Read more »&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.lahma.net/feeds/345216043690603519/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.lahma.net/2018/11/optimizing-jint-part-5-optimizing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7556585108877163335/posts/default/345216043690603519'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7556585108877163335/posts/default/345216043690603519'/><link rel='alternate' type='text/html' href='http://blog.lahma.net/2018/11/optimizing-jint-part-5-optimizing.html' title='Optimizing Jint part 5: Optimizing Javascript primitives'/><author><name>Marko Lahma</name><uri>http://www.blogger.com/profile/11287923061418676026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7556585108877163335.post-176389372180601931</id><published>2018-11-01T12:00:00.000+02:00</published><updated>2018-11-01T15:44:54.037+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Jint"/><category scheme="http://www.blogger.com/atom/ns#" term="Performance"/><title type='text'>Optimizing Jint part 4: Interfaces are good, virtual calls better, direct field access the best</title><content type='html'>&lt;blockquote class=&quot;tr_bq&quot;&gt;
I&amp;#39;m probably going to break all the rules of OO encapsulation and some SOLID principles here. Be warned.&lt;/blockquote&gt;
&lt;br&gt;
We all have had our share of the strategy pattern, abstract factory, you name it. Abstracting targets behind interfaces and abstract base classes. They all are fine and aim to produce better software and they usually do. But when it comes to performance, you should sometime bend the rules a bit.&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://blog.lahma.net/2018/11/optimizing-jint-part-4-interfaces-are.html#more&quot;&gt;Read more »&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.lahma.net/feeds/176389372180601931/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.lahma.net/2018/11/optimizing-jint-part-4-interfaces-are.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7556585108877163335/posts/default/176389372180601931'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7556585108877163335/posts/default/176389372180601931'/><link rel='alternate' type='text/html' href='http://blog.lahma.net/2018/11/optimizing-jint-part-4-interfaces-are.html' title='Optimizing Jint part 4: Interfaces are good, virtual calls better, direct field access the best'/><author><name>Marko Lahma</name><uri>http://www.blogger.com/profile/11287923061418676026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7556585108877163335.post-614360538437474470</id><published>2018-10-30T00:00:00.000+02:00</published><updated>2018-10-30T00:00:10.383+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Jint"/><category scheme="http://www.blogger.com/atom/ns#" term="LINQ"/><category scheme="http://www.blogger.com/atom/ns#" term="Performance"/><title type='text'>Optimizing Jint part 3: Banishing LINQ</title><content type='html'>&lt;blockquote class=&quot;tr_bq&quot;&gt;
So you want your code go fast? Just remove all occurrences of&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;using System.Linq;&lt;/span&gt;&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
and make the code compile again without it and be done with!&lt;/blockquote&gt;
&lt;br /&gt;
In all seriousness, LINQ is a powerful tool, but it also has it&#39;s pitfalls. It really makes a difference if you use LINQ in the wrong places, one being the hot paths of a Javascript interpreter.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Next I&#39;m going to show examples of &lt;b&gt;better performing code&lt;/b&gt; - it&#39;s neither prettier nor more idiomatic than the LINQ counterpart. So be warned. You should again weigh your use case and whether anything here is really needed.&lt;/i&gt;&lt;br /&gt;
&lt;h3&gt;
Jint optimization: usage of LINQ in Jint&lt;/h3&gt;
&lt;div&gt;
Jint used LINQ in some places and made the code quite easy to read. Jint being an interpreter, it made things unnecessarily slow however. When scripts are run there can be millions of iterations in loops, choosing the correct way of looping and collecting data can make a big difference.&lt;br /&gt;
&lt;br /&gt;
Removing LINQ is quite the easy optimization for libraries that have hot paths and intensive calls.&lt;/div&gt;
&lt;h3&gt;
What&#39;s wrong with LINQ&lt;/h3&gt;
&lt;div&gt;
LINQ is a powerful abstraction that allows you to create idiomatic and logical constructs, usually easy to read code. It however, does this with the price of performance. Every abstraction you add, adds performance penalty.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Here&#39;s a classic example, that brings out most of the bad things you can think of. Let&#39;s filter and transform an array using LINQ and then compare that with boring old procedural c# code that&#39;s somewhat optimized for the case and is not using anything fancy.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;script src=&quot;https://gist.github.com/lahma/cabd5f73b1a37140f6a5a8feb5e54ecb.js&quot;&gt;&lt;/script&gt;

So the LINQ version is quite idiomatic and gets the job done in much less lines of code, what about the numbers?
&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;I&#39;m deliberately using .NET Framework here, &lt;b&gt;the LINQ version will run a lot faster under .NET Core&lt;/b&gt;, but the full framework is still the case we all need to consider as a runtime environment.&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;script src=&quot;https://gist.github.com/lahma/240f8aae16daebba32e0b6cbc042e9c0.js&quot;&gt;&lt;/script&gt;
Can you spot the difference? There&#39;s a closure allocation because outer context is being referenced (the &lt;i&gt;forbidden&lt;/i&gt; variable), the ToArray has trouble determining the wanted size and grows with the flow. Then there a are those little things like .Where taking a IEnumerable&lt;t&gt; which requires a wrapper creation as array does not implement IEnumerable. Fun times.&lt;/t&gt;&lt;br /&gt;
&lt;t&gt;&lt;br /&gt;&lt;/t&gt;

&lt;t&gt;OK it only takes 2.5x the time with LINQ and the overall time is a drop in the big ocean of run times of your software. But the thing is, &lt;b&gt;these things add up&lt;/b&gt;&lt;i&gt;.&lt;/i&gt;&amp;nbsp;When we are talking about interpreter, there&#39;s a lot of loops and &lt;b&gt;they all add up&lt;/b&gt;. If you need to call the logic 5000 times it&#39;s either 3 seconds or 5 seconds of wall clock run time.&lt;/t&gt;&lt;br /&gt;
&lt;h3&gt;
&lt;t&gt;Context-capturing closures&lt;/t&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;t&gt;When LINQ captures context, like variables outside of it&#39;s lambda functions, LINQ needs to build a instance of a class to hold to the context state. Above example showed this via the forbidden lookup. Converting to regular loop gives you better performance when a lot of data is processed.&lt;/t&gt;&lt;/div&gt;
&lt;h3&gt;
&lt;t&gt;LINQ over arrays&lt;/t&gt;&lt;/h3&gt;
&lt;div&gt;
It might not be directly evident, but LINQ needs to create a wrapper to allow you use the LINQ methods when you access an array. Array does not directly implement IEnumerable so tricks are needed. Let&#39;s examine how foreach and LINQ-based functions to return whether array of strings contains a non-null element differs.
&lt;/div&gt;
&lt;h4&gt;
LINQ against an array&lt;/h4&gt;
The LINQ version produces famous &amp;lt;&amp;gt;c classes that you might have seen in task traces. So looking at the following example you can see how the machinery to hold state is produced by the compiler.
&lt;script src=&quot;https://gist.github.com/lahma/81b3b43d107261ee3da1e2c8b23ea28d.js&quot;&gt;&lt;/script&gt;
&lt;h4&gt;
Regular loop against an array&lt;/h4&gt;
Compare the earlier to a version that doesn&#39;t use LINQ, see how much less code and state to handle.

&lt;script src=&quot;https://gist.github.com/lahma/88de7bb0ce742952bc7a509b2cf48486.js&quot;&gt;&lt;/script&gt;

&lt;h3&gt;Don&#39;t optimize too early (or too late)&lt;/h3&gt;

&lt;div&gt;
I don&#39;t believe too much in &quot;don&#39;t optimize early&quot; mentality. I believe in:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
Understand the use case, common usage patterns, input variance and size - and then optimize or skip optimization accordingly.&lt;/blockquote&gt;
If the code is in hot path, called a lot and affects the overall system performance - just make it fast to begin with.
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
There are however those many places where writing LINQ makes code a lot cleaner and idiomatic. When you know performance won&#39;t be an issue, just endorse it. It&#39;s a good tool as long as you know its limits.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;h3&gt;
Things to remember and consider&lt;/h3&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;Non-LINQ version is usually/always faster&lt;/li&gt;
&lt;li&gt;LINQ can capture context and throw memory allocations through the roof&lt;/li&gt;
&lt;li&gt;Prefer concrete (collection) types when using LINQ extensions&lt;/li&gt;
&lt;li&gt;Array might be a bad source in hot paths as it requires a wrapper&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://blog.lahma.net/feeds/614360538437474470/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.lahma.net/2018/10/optimizing-jint-part-3-banishing-linq.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7556585108877163335/posts/default/614360538437474470'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7556585108877163335/posts/default/614360538437474470'/><link rel='alternate' type='text/html' href='http://blog.lahma.net/2018/10/optimizing-jint-part-3-banishing-linq.html' title='Optimizing Jint part 3: Banishing LINQ'/><author><name>Marko Lahma</name><uri>http://www.blogger.com/profile/11287923061418676026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7556585108877163335.post-8269630064869589719</id><published>2018-10-29T12:00:00.000+02:00</published><updated>2018-10-29T10:40:37.404+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Jint"/><category scheme="http://www.blogger.com/atom/ns#" term="Performance"/><title type='text'>Optimizing Jint part 2: Tools of the trade</title><content type='html'>I think making performance optimizations is a great example of true engineering task, there should be numbers and evidence, always. You cannot state that something has improved unless you can show hard numbers about either reduced time to run or reduced memory usage (ideally of course both). Otherwise it&amp;#39;s just good old &lt;a href=&quot;https://www.windowscentral.com/seems-faster&quot;&gt;feels faster&lt;/a&gt;.&lt;br&gt;
&lt;br&gt;
In this post we&amp;#39;ll examine some tools and checklists when doing performance analysis.&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://blog.lahma.net/2018/10/optimizing-jint-part-2-tools-of-trade.html#more&quot;&gt;Read more »&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.lahma.net/feeds/8269630064869589719/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.lahma.net/2018/10/optimizing-jint-part-2-tools-of-trade.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7556585108877163335/posts/default/8269630064869589719'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7556585108877163335/posts/default/8269630064869589719'/><link rel='alternate' type='text/html' href='http://blog.lahma.net/2018/10/optimizing-jint-part-2-tools-of-trade.html' title='Optimizing Jint part 2: Tools of the trade'/><author><name>Marko Lahma</name><uri>http://www.blogger.com/profile/11287923061418676026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7556585108877163335.post-7818732223839976937</id><published>2018-10-26T12:00:00.000+03:00</published><updated>2018-10-29T10:38:59.438+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Jint"/><category scheme="http://www.blogger.com/atom/ns#" term="Performance"/><title type='text'>Optimizing Jint part 1: Setting the stage</title><content type='html'>&lt;i&gt;This is a story that started a year ago, but I finally had the time and motivation to write something down. I hope this story about a performance journey might give some insights to performance optimizations and how I analyze and optimize code.&lt;/i&gt;&lt;br&gt;
&lt;i&gt;&lt;br&gt;&lt;/i&gt;
&lt;i&gt;&lt;/i&gt;&lt;br&gt;
&lt;a href=&quot;http://blog.lahma.net/2018/10/optimizing-jint-part-1-setting-stage.html#more&quot;&gt;Read more »&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.lahma.net/feeds/7818732223839976937/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.lahma.net/2018/10/optimizing-jint-part-1-setting-stage.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7556585108877163335/posts/default/7818732223839976937'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7556585108877163335/posts/default/7818732223839976937'/><link rel='alternate' type='text/html' href='http://blog.lahma.net/2018/10/optimizing-jint-part-1-setting-stage.html' title='Optimizing Jint part 1: Setting the stage'/><author><name>Marko Lahma</name><uri>http://www.blogger.com/profile/11287923061418676026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7556585108877163335.post-4805206380769212290</id><published>2009-09-11T08:17:00.001+03:00</published><updated>2018-10-26T18:29:16.378+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Quartz.NET"/><title type='text'>Quartz.NET is now CLSCompliant!</title><content type='html'>Quartz.NET trunk was updated with &lt;a href=&quot;http://netcommon.sourceforge.net/&quot;&gt;Common.Logging 2.0&lt;/a&gt; which was made &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/bhc3fa7f.aspx&quot;&gt;CLSCompliant&lt;/a&gt; and now it was also possible to make Quartz.NET obey the requirements of Common Language System compliance with a few tweaks to the source code. &lt;br /&gt;
At the same time I also dropped support for VS2003 and VS2005 solutions. Using VS2008 for now allows targeting .NET 2.0 and source code finally gets the sweet language features of C# 3…&lt;br /&gt;
Maybe next little issue to dabble with could be to &lt;a href=&quot;http://www.klopfenstein.net/lorenz.aspx/running-quartz-net-1-0-on-a-medium-trust-host&quot;&gt;make Quartz.NET run under medium trust&lt;/a&gt;…</content><link rel='replies' type='application/atom+xml' href='http://blog.lahma.net/feeds/4805206380769212290/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.lahma.net/2009/09/quartznet-is-now-clscompliant.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7556585108877163335/posts/default/4805206380769212290'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7556585108877163335/posts/default/4805206380769212290'/><link rel='alternate' type='text/html' href='http://blog.lahma.net/2009/09/quartznet-is-now-clscompliant.html' title='Quartz.NET is now CLSCompliant!'/><author><name>Marko Lahma</name><uri>http://www.blogger.com/profile/11287923061418676026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7556585108877163335.post-4471766052500976433</id><published>2009-09-03T14:03:00.000+03:00</published><updated>2018-10-26T18:29:41.130+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Quartz.NET"/><title type='text'>Getting Started With Quartz.NET – Part 2</title><content type='html'>In the previous post we did a short evaluation whether Quartz.NET would be a viable choice for a project. In this post we’ll go through the steps to get Quartz.NET up and running.&lt;br /&gt;
&lt;h3&gt;
Getting the distribution&lt;/h3&gt;
&lt;h4&gt;
&lt;/h4&gt;
You will find the latest download information on &lt;a href=&quot;http://quartznet.sourceforge.net/download.html&quot;&gt;Quartz.NET’s download page&lt;/a&gt;. Just follow the links and choose the latest binary distribution. In your case that is Quartz.NET 1.0.1. After you have have download the zip file you should extract it to some location so we can explore the distribution a bit further.&lt;br /&gt;
&lt;h3&gt;
What’s inside the package&lt;/h3&gt;
Quartz.NET is distributed ready to run and source included the package does not contain documentation at the moment as the latest &lt;a href=&quot;http://quartznet.sourceforge.net/apidoc/&quot;&gt;API documentation&lt;/a&gt; and &lt;a href=&quot;http://quartznet.sourceforge.net/tutorial/index.html&quot;&gt;the tutorial&lt;/a&gt; are available on the project’s website.&lt;br /&gt;
&lt;h5&gt;
The bin folder&lt;/h5&gt;
This folder contains the actual binaries that you will need to use Quartz.NET in your application. There are separate subfolders for 1.1, 2.0 and 3.5 respectively.&lt;br /&gt;
&lt;h5&gt;
The database folder&lt;/h5&gt;
This folder contains the create scripts for Quartz.NET database. There’s a script for each supported database.&lt;br /&gt;
&lt;h5&gt;
The lib folder&lt;/h5&gt;
This folder contains the external dependencies of Quartz.NET. Quartz.NET requires Nullables library for the 1.1 build to get nullable-like features and the &lt;a href=&quot;http://netcommon.sourceforge.net/&quot;&gt;Common.Logging framework&lt;/a&gt; for all builds. The folder contents are needed when building from the source.&lt;br /&gt;
&lt;h5&gt;
The server folder&lt;/h5&gt;
This folder contains the Quartz.NET sample Windows Service. It acts as a sample how to build a windows service for running of jobs and it can be used as-is if ne customizations are required. This server will be discussed in future blog posts.&lt;br /&gt;
&lt;h5&gt;
The src folder&lt;/h5&gt;
This folder contains the source the Quartz.NET.&lt;br /&gt;
You can also find the the solution files,license, readme and change log information in the root of the distribution.&lt;br /&gt;
Now that we have had a quick tour around he distribution we should be ready to create our first little sample application in part 3 of our series.</content><link rel='replies' type='application/atom+xml' href='http://blog.lahma.net/feeds/4471766052500976433/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.lahma.net/2009/09/getting-started-with-quartznet-part-2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7556585108877163335/posts/default/4471766052500976433'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7556585108877163335/posts/default/4471766052500976433'/><link rel='alternate' type='text/html' href='http://blog.lahma.net/2009/09/getting-started-with-quartznet-part-2.html' title='Getting Started With Quartz.NET – Part 2'/><author><name>Marko Lahma</name><uri>http://www.blogger.com/profile/11287923061418676026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7556585108877163335.post-3444608394185144242</id><published>2009-08-30T14:02:00.001+03:00</published><updated>2018-10-26T18:29:28.514+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Quartz.NET"/><title type='text'>Getting Started With Quartz.NET – Part 1</title><content type='html'>This is the first blog post on the series of posts about getting familiar with &lt;a href=&quot;http://quartznet.sourceforge.net/&quot;&gt;Quartz.NET&lt;/a&gt;. In this blog posts we dig in to the requirements and common things we might want to decide before proceeding.&lt;br /&gt;
&lt;h3&gt;
Evaluating whether Quartz.NET is the thing for you&lt;/h3&gt;
First of all, it’s always a good thing to evaluate whether the tool is suitable for one’s needs. It goes without saying that like any other tool, Quartz.NET is no silver bullet (but a good golden hammer I hear). The easiest way to nail it is to quote the project’s &lt;a href=&quot;http://quartznet.sourceforge.net/&quot;&gt;home page&lt;/a&gt;:&lt;br /&gt;
&lt;blockquote&gt;
&lt;cite&gt;Quartz.NET is a full-featured, open source job scheduling system that can be used from smallest apps to large scale enterprise systems&lt;/cite&gt;&lt;/blockquote&gt;
Well big words but I believe that Quartz.NET can live up to it. Quartz.NET was ported from the famous Java Quartz&amp;nbsp; and so If you’re familiar with the Java one, you should have no trouble grasping the concepts of Quartz.NET. Quartz.NET is distributed with same license as Java version, &lt;a href=&quot;http://www.apache.org/licenses/LICENSE-2.0&quot;&gt;Apache 2.0&lt;/a&gt;, which in short gives plenty of breathing room including hassle-free commercial usage. &lt;br /&gt;
&lt;strong&gt;Quartz.NET is for you if…&lt;/strong&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;You need a flexible scheduling framework written in pure .NET &lt;/li&gt;
&lt;li&gt;You need failover or clustering support for job scheduling/execution &lt;/li&gt;
&lt;li&gt;You want the best bang for the buck, it’s free as in beer &lt;/li&gt;
&lt;/ul&gt;
&lt;strong&gt;Quartz.NET might not be for you if…&lt;/strong&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;You have a “no open source” policy ;) &lt;/li&gt;
&lt;li&gt;You are trying to handle workflows or batch processing (well you can bend it but it’s just not a natural fit) &lt;/li&gt;
&lt;li&gt;You prefer Visual Studio wizards and shrink-wrapped products – Quartz.NET will have it’s learning curve like any other framework &lt;/li&gt;
&lt;/ul&gt;
If you decided yes (a good call) we can proceed!&lt;br /&gt;
&lt;h3&gt;
Quartz.NET requirements&lt;/h3&gt;
Quartz.NET 1.0 is written in C# and targets framework 1.1 and above (you probably would get it to run with framework 1.0 quite effortlessly). So the requirements in a nutshell:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;.NET Framework 1.1 or above, builds supplied for 1.1, 2.0 and 3.5 separately &lt;/li&gt;
&lt;li&gt;Database if fail-safe persistence required, supported databases include MS SQL Server, Oracle, MySQL, PostgreSQL, SQLite and Firebird &lt;/li&gt;
&lt;/ul&gt;
As you can see, Quartz.NET is quite self-contained and requires little from you application. If you got interested with the framework then the next post is for you as were going to get started with Quartz.NET!</content><link rel='replies' type='application/atom+xml' href='http://blog.lahma.net/feeds/3444608394185144242/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.lahma.net/2009/08/getting-started-with-quartznet-part-1.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7556585108877163335/posts/default/3444608394185144242'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7556585108877163335/posts/default/3444608394185144242'/><link rel='alternate' type='text/html' href='http://blog.lahma.net/2009/08/getting-started-with-quartznet-part-1.html' title='Getting Started With Quartz.NET – Part 1'/><author><name>Marko Lahma</name><uri>http://www.blogger.com/profile/11287923061418676026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7556585108877163335.post-2397119260770075770</id><published>2009-01-18T16:31:00.001+02:00</published><updated>2009-01-18T16:37:47.329+02:00</updated><title type='text'>Start Your Engines</title><content type='html'>This is the famous first post! I&#39;m starting to blog about mostly technology related things (.NET in particular), probably with special focus on my pet project,&lt;a href=&quot;http://quartznet.sourceforge.net&quot;&gt; Quartz.NET&lt;/a&gt;.</content><link rel='replies' type='application/atom+xml' href='http://blog.lahma.net/feeds/2397119260770075770/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.lahma.net/2009/01/start-your-engines.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7556585108877163335/posts/default/2397119260770075770'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7556585108877163335/posts/default/2397119260770075770'/><link rel='alternate' type='text/html' href='http://blog.lahma.net/2009/01/start-your-engines.html' title='Start Your Engines'/><author><name>Marko Lahma</name><uri>http://www.blogger.com/profile/11287923061418676026</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>