Best Practices to Build Memory Optimized Apps

WalkingTree Technologies
2 min readFeb 18, 2019

--

By Walking Tree Sencha ExtJS Sencha ExtReact February 18, 2019

INTRODUCTION

RIA frameworks are becoming the de facto UI development frameworks in all the major industries today. Earlier, RIA was primarily used to build web or mobile applications for enterprises. However, with the kind of flexibility that they offer, their rich feature set, and the device agnostic support that they extend, these frameworks are being used in many niche fields like scientific research and academics.

The biggest constraint that we need to work on while building apps for scientific research is the limited memory for computation. These apps run on specific devices with low memory. Apps that are utilized in the scientific community will do the computation in the front-end application, but they perform this heavy lifting with the limited availability of memory.

While designing and developing applications, we should follow certain best practices to optimize memory consumption without compromising on the speed and other relative parameters.

In this blog, I will cover the best practices that we have mastered and would recommend to the developer community to follow while building memory optimized applications. I am putting these comments in context to Sencha.

For Practical Advice on Sencha, Call our technology experts today.
To learn more about Walking Tree Technology’s expertise in Sencha click here.

An Insight into Sencha’s Memory Management

The Sencha framework automatically allocates memory when objects are created and frees it when they are not used anymore with a process called garbage collection. This can be the potential source of memory challenges as it gives the false impression to developers that they don’t need to worry about memory management.

Here, I want to highlight the memory life cycle which is standard in all programming languages.

  1. Allocation of memory
  2. Usage of allocated memory
  3. The Release of the allocated memory after use

Most memory management issues come in the 3rd phase. The hardest task is to find when the allocated memory is not needed anymore and free it. Sencha (Javascript) is embedded with a piece of software called “garbage collector” which performs the job of tracking memory allocation and find the piece of unused memory and free it. This process is an approximation since no algorithm can determine accurately whether some piece of memory is needed or not.

Originally published at walkingtree.tech on February 18, 2019.

--

--

WalkingTree Technologies
WalkingTree Technologies

Written by WalkingTree Technologies

WalkingTree is an IT software and service provider recognized for its passion for technology.

No responses yet