Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- performance



  CSS box-shadow Can Slow Down Scrolling

Working on one of the Chromebooks Google lets you borrow on Virgin America flights, I noticed scrolling down the page on my airbnb.com dashboard was much slower than on my normal laptop. I chalked it up to weak Chromebook hardware, but other sites were scrolling just fine. box-shadow had caused slow scrolling on our search results page before, so I did some investigation.I used Chrome's Timeline tab to see the duration of paint events on the page. Before each test I forced a garbage collection a...

   CSS,box-shadow,performance,Timeline,Chromebook     2011-11-13 08:13:48

  Deep Dive into Spin Locks in Golang

In concurrent programming, a Mutex is a commonly used synchronization mechanism to protect critical resources and prevent data races. However, in certain specific scenarios, especially when the lock-holding time is short and the number of threads is limited, a more lightweight lock known as a Spin Lock can provide higher performance. What is a Spin Lock A Spin Lock is a form of busy-wait lock. When a thread attempts to acquire a lock held by another thread, it continuously checks the lock's stat...

   SPINLOCK,MUTEX,GOLANG     2024-01-10 05:53:28

  ConcurrentHashMap vs Collections.synchronizedMap()

ConcurrentHashMap and Collections.synchronizedMap() both provide thread-safe operations of collections of data. They are used in multithreaded programs to provide both thread safety and performance improvements. In many cases, we can use either of them. But the realization of thread safety is different for these two implementations. ConcurrentHashMap will create an HashEntry[] array internally to store the elements passed in from a Map, while Collections.synchronizedMap() will return a Synchroni...

   ConcurrentHashMap,Collections.synchronizedMap     2014-09-18 05:04:59

  Using C for a specialized data store

Pixenomics stores and transports 1.2 million pixels from the server to the client. During development we played with various methods to store and process this. Our ultimate goal was to send the entire board in under 1 second. During the stages of prototyping we used a MySQL database without thinking too much about performance. With a mere 2,000 pixels we quickly realised this wasn’t even usable as a demo. Changing the storage engine to memory was much better but still obviously unu...

   C,Data store,Efficiency,Performance     2012-03-07 05:09:38

  Why is single threaded Redis so fast

Redis is a high-performance, in-memory key-value database. According to official test reports, it can support around 100,000 QPS (queries per second) on a single machine. However, Redis uses a single-threaded architecture in its design. Why does Redis still have such high performance with a single-threaded design? Wouldn't it be better to use multiple threads for concurrent request processing? In this article, let's explore why Redis has a single-threaded architecture and still maintains its spe...

   REDIS,SINGLE-THREADED,MULTI-THREADING     2023-02-28 05:16:22

  Facebook share price is over $38 before the market opens on Wednesday

According to Sina Tech, Facebook share price is over $38 before the market opens on Wednesday. It's the first time that its share price is over $38 since its IPO last year. In May 2012, Facebook went to public on Nasdaq with a releasing share price of $38. The share price went below $38 after the first trading day. Then after its share price kept dropping until last September it reached to its lowest point with a share price of $17.58. But as Facebook's performance was better than expected last...

   Facebook ,Share price     2013-07-31 07:45:18

  High performance web apps with C++

It is Christmas over here, and it is time of giving. So I decided to give something back to the community. I guess this is as old as web programming itself. Trying to create C++ web framework. If you search on the web, you can find dozen of guys that had exactly the same idea. I am not different. For one of the previous projects(discontinued now) I created simple web framework in C++. If you like to hack in C++, here it is. Code is provided as-is, as part of larger application. You can ex...

   C++,Web apps,Web framework     2012-01-08 10:06:48

  My love… for Expressive Programming Languages

I started out my journey with programming as a teenager learning GW-BASIC. Soon I learnt C language followed by C++.  I was impressed with the OO syntactic constructs C++ had on offer but I felt a little uneasy with a few constructs such as the scope resolution. I started studying Java. It immediately caught my attention with the syntactic improvements and simplifications it brought over C++. I was still in academics, so learning(precisely trying) programming languages on su...

   descriptive,programming,language,prefere     2011-08-17 07:31:09

  Circumventing browser connection limits for fun and profit

A few days ago, this video hosted by metacafe popped up on digg, explaining how to increase site download times by tweaking your browser settings to increase connection parallelism. To explain why this works, let’s step back a bit to discuss how browsers manage server connections. In building any application, developers are often required to make ‘utilitarian’ choices. Pretentiously paraphrasing Jeremy Bentham, ‘utilitarian’ describes an approach that ââ‚...

   HTTP,Concurrent connection limit,Solution,AJAX     2011-12-14 13:01:02

  Handle NXDomain error when resolving IP address in Ruby DNS resolver

In another post, we covered how to resolve SystemStackError when resolving IP address in Ruby. In this post, we would cover another common issue where a NXDomain error is returned when resolving an IP address. The NXDomain error means that the queried domain name does not exist in the DNS. In Ruby, DNS resolver library will use /etc/resolv.conf by default get the name servers to resolve the domain name. There are multiple DNS name servers can be specified in /etc/resolv.conf with below format. ...

   RUBY,RUBY ON RAILS,NETWORK,DNS,NXDOMAIN     2017-07-16 01:39:23