Skip to content

Commit fdcfe4d

Browse files
committed
Add new posts
1 parent f820ebb commit fdcfe4d

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
layout: blog
3+
title: "Improving The Performance of Blaze - Better Way To Destroy Views"
4+
category: blog
5+
summery: ""
6+
---
7+
8+
We all agree that Blaze has decent performance, but it's not close to React for some reason. But in theory Blaze should be much better than react because Blaze know how to deal with Meteor's reative data.
9+
10+
So, I decided to spend time on where Blaze is having issues and how we can improve blaze. In my recent code review, I found three possible way to improve the performance of Blaze.
11+
12+
1. Better way to destroy views
13+
2. DOM/Template caching
14+
3. Asynchnous DOM rendering
15+
16+
In this article, I'm talking about "destroying views" and why it's an issue. Unfortunately, implementing a proper fix takes a lot of time and effort. So, that's not something I can do with my limited time. But, I'll share a possible solution we can use.
17+
18+
> In Blaze View is any kind of UI element. It includes not only Templates but if, with, value lookups and other control elements.
19+
20+
## The Problem
21+
22+
We've seen few issues about Blaze's slowness when working with a large project. Often, the problem was view destruction. I could be able to get a good sense of when I was using Kadira Debug.
23+
24+
So, I've created a [simple app](link to the app) to showcase this.
25+
26+
Let's have a look at our app:
27+
28+
![Demonstrating The App](the-video)
29+
30+
As you seen on the video, View Destruction is costly. This gets worst with the number of DOM elements/views in your app.
31+
32+
![View Destruction is Hard](https://cldup.com/zwUdtEjUHA.png)
33+
34+
## The Issue
35+
36+
So, why it's so hard to destroy views. Let's have a look at how Blaze destroy views.
37+
38+
> Here's I'm not going to give you extact details, but this is how it works.
39+
40+
Let's say our top view is destroying. Then, blaze trie
41+
42+
43+
+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
layout: blog
3+
title: "Initial Impressions on GraphQL & Relay"
4+
category: blog
5+
summery: "This is a detailed review of Facebook's two great projects: GraphQL and Relay. We also discuss about some suggestions for making them better."
6+
link: "https://kadira.io/blog/graphql/initial-impression-on-react-and-graphql"
7+
---

0 commit comments

Comments
 (0)