Articles tagged 'performance'
January 27, 2016
If you’ve worked with relational databases and any ORMs like Java’s Hibernate, .NET’s NHibernate or Rails’
ActiveRecordin the past, you might be familiar with SELECT N+1 issues. It is a common performance problem in database-dependent applications and, because of this, these ORMs provide a built-in solution to this problem.
eager_loadcome to the rescue. Therefore, it is not unusual to find these keywords scattered in different places where your application accesses the database. Hopefully this isn’t a lot of places though - you are using Query Objects, right?
An example application
Let’s imagine for a second that we have an application where you can browse restaurants, which in turn have many reviews...
July 28, 2012
This post was originally published in the Rambling Labs Blog on July 28, 2012.
As done with the jQuery Rambling Slider previously on this week, and as I promised on that post as well, the Rambling Trie now has its own homepage on ramblinglabs.com! Here’s the link:
It features installation and usage steps as well as a contributing page, and includes the badges from various cool GitHub services (more on that later). It also has a brand new logo, inspired on the trie data structure (and other tree data structures) concept.
Go ahead and check it out!
- Examples page for jQuery Rambling Slider
- Examples page for Rambling Trie
- Examples page for Rambling Slider...
July 21, 2012
This post was originally published in the Rambling Labs Blog on July 21, 2012.
Version 0.4.1 of the Rambling Trie is here. It has some minor performance improvements over previous versions, changes in file/directoy structure, as well as a new API entry point, other API methods and more documentation.
You can now instance a new trie like this:
trie = Rambling::Trie.create
The old API entry point
Rambling::Trie.newis now marked as deprecated and will be removed soon. Use the new
Also, you can add words to the trie using
trie << 'word'
And check if a word is contained in the trie with
You can see more documentation available on the project’s...
February 13, 2012
This post was originally published in the Rambling Labs Blog on February 13, 2012.
The new version of the
rambling-triegem is out! As I said on my previous post, the
rambling-trieis an implementation of the Trie data structure in Ruby.
Version 0.3.3 has several performance improvements, and I also added the code’s documentation via Yard. Also, since the previous version (0.3.2), the methods
is_word?have been fixed for the compressed trie.
For the uncompressed trie, the
is_word?methods work very fast. The compressed trie’s
is_word?method is as fast as it’s uncompressed counterpart, but the
has_branch_for?is a bit slower.
I’ve also added some benchmarking reports for each version of the...