Improving DOM rendering speed in Internet Explorer 11 with Angular 2

Looking for tips on how to boost performance for an Angular 2 app specifically on Internet Explorer 11?

Our website runs smoothly on Chrome and Firefox, but experiences slow DOM rendering on IE 11. While I know the browser engine plays a part in this sluggishness, seeing a single change detection cycle take 30-40 ms for DOM painting on IE 11 makes me believe there could be more we can do with our implementation. To put it into perspective, Chrome only takes around 1 ms to paint the DOM, making IE's performance significantly slower.

Here's a snapshot of the performance monitoring we ran on IE11 for a DOM event (scroll).

https://i.sstatic.net/N2Gij.png

When comparing our results to websites like The Guardian, who also use Angular 2, their DOM event handling time is consistently under 2ms despite their more complex content display.

https://i.sstatic.net/3DtRb.png

This leads me to believe that there might be optimization techniques tailored specifically for IE 11. Here are some strategies we've already attempted:

  1. Switching from SystemJS to Webpack improved initial loading speed, but didn't impact DOM painting duration.
  2. We utilize core-js over es6-shim
  3. Implementing pure pipes for formatting and eliminating function calls from templates.

We're open to any suggestions or advice you may have!

Answer №1

Dealing with Angular compatibility in Internet Explorer can be challenging due to various factors. For instance, Angular heavily relies on manipulating the DOM tree and tracking child/parent nodes, which doesn't align well with IE's non-linear DOM structure. This discrepancy often leads to performance issues, particularly in terms of change detection cycles that can make Angular feel clunky and oversized.

To address these challenges, Angular 2+ introduced improvements such as customizable change detection strategies. By adjusting the ChangeDetectorRef service's strategy to 'ChangeDetectionStrategy.OnPush', developers can optimize change detection specifically for component inputs. Similarly, detaching the change detector during intensive user interactions like clicking and dragging can significantly boost performance, although implementation may vary depending on individual applications.

Additional Optimization Strategies

Exploring techniques like running certain tasks outside of Angular's zone using NgZone, optimizing list rendering with NgFor by implementing a custom trackBy function, and leveraging AOT compilation for faster load times are also recommended practices. Additionally, identifying potential performance bottlenecks unrelated to Angular, such as table rendering or dynamic styling calculations, is crucial for ensuring smooth functionality across all platforms.

Ultimately, overcoming Angular-IE compatibility issues requires a tailored approach based on specific application requirements and platform constraints. Good luck!

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Expand the accordion to reveal all the content

I'm facing an issue with my accordion where a scrollbar appears in every content section. To fix this, I tried setting overflow: hidden in the CSS: .ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; overflow: hidd ...

Leveraging Amazon IVS Player within Angular

Struggling to integrate the npm version of the amazon-ivs-player with Angular, as it seems optimized for webpack while I am using angular-cli. Following a guide at this link. The issue arises with importing the wasm files in my Angular application: ERROR ...

How to properly implement envMap in Three.js?

Could someone assist me in finding a material similar to the one shown here? I attempted to implement it using the following code: * { margin: 0; padding: 0; } .object { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; pointer-events: no ...

Updating Angular libraries can enhance the performance and functionality of

Within our organization, we rely on several custom Angular libraries for the majority of our projects. The issue arises when we need to update our codebase to a new version of Angular, as it requires updating all libraries simply to ensure compatibility ...

Generating CoffeeScript script that calls a class

It seems like I'm facing some difficulties here and not making much progress. I wrote a class using Coffeescript: # CoffeeScript App= Title:"" TopMenu:[] AddTopMenu:(title,count,icon)-> Record= ...

Why is it that my TypeScript isn't permitting the definition of Tuple Types?

When attempting to define a tuple type in my code, an error is being thrown. Is there a specific configuration within my Node.js application that needs to be adjusted in order to accept tuple types? ...

This is my first experience with a Vue/webpack application, and surprisingly, there is no webpack

I am facing an issue with my app not properly loading css files. I suspect it has something to do with the fact that my app is utilizing webpack, but I am unable to locate a webpack.config.js file in the root directory. Instead, I have found webpack.base. ...

React and React Router are causing the login screen layout to persistently display

The MUI Theme Provider I have includes a Layout with Dashboard and Order screens. Even though the user hits the '/' endpoint, the Login Screen should be displayed instead of the Layout. -App.js <ThemeProvider theme={theme}> <Router> ...

Duplicate key error occurred in the collection resulting in Error Handling: E11000

Encountering an issue with the user model I'm utilizing alongside Mongoose and MongoDB to create profiles in my database. The process works smoothly when posting a single user, but throws an error upon logging out and attempting to add another: { ...

Submitting a form that was loaded using jQuery cannot be done with jQuery

After successfully using jQuery to load a form from the sidebar to the main page, I encountered an issue with submitting the form using jQuery as well. Although I have previously used the same jQuery code to submit forms that were not loaded with jQuery, t ...

tips on displaying information in a vertical tab orientation

I'm struggling to figure out how to loop inside the <TabPanel> in order to render data using React vertical tabs. I've provided the code I've tried and the data coming from an API. Check out the codesandbox at https://codesandbox.io/s/ ...

Rebuilding a Component's Template in Angular 2

In an ideal scenario, I would prefer to reload or rerender the template of my component. However, if there is a more efficient method available, I am open to implementing it. Desired Outcome: I have a menu component for which I need to dynamically add a ...

Unexpected anomaly with Jquery's after() method

Currently, I am working on the following task: I want to dynamically add a new student to a table of existing students using AJAX when a student is added through my user interface. The process involves sending the UI input fields to the controller, which ...

Submitting a Form using AJAX in vanilla JavaScript (without the use of jQuery)

I'm looking for guidance on how to send a Form via an AJAX request. Specifically, I need help with the 'xmlhttp.open' line. The goal is to upload a video file to a third party video hosting site using their API and provided URL ('upload ...

What is the reason for the Client Height value not affecting other elements?

I'm trying to set the spacing of my sidebar from the top equal to the height of the header. However, when I use clientHeight in JavaScript to get the height and then try to apply it to other elements using marginTop or top values (with position includ ...

Implementing dynamic data binding in JavaScript templates

I've been experimenting with jQuery and templates, and I managed to create a basic template binding system: <script type="text/template" id="Template"> <div>{0}</div> </script> Furthermore... var buffer = ''; v ...

Building a React Router powered Backend API

Within my application, I have an Express backend that serves a Login page to users as part of a React App. The app includes a button that guides users through Google's O-Auth process, returning user information in the following manner: router.get("/g ...

Having trouble sending specific data using the jQuery Form Plugin ajaxForm feature

Currently, I am utilizing two jQuery plugins: plupload and jQuery Form Plugin ajaxForm. Everything is functioning well except for one issue: I am unable to send the file.name (using ajaxForm) of a previously uploaded file with plupload. To elaborate more ...

Utilizing a CSS property within jQuery

Here is the code snippet: http://jsfiddle.net/cmac2712/dnLgD/ $(document).ready(function () { var setVisibility = function(n){ $('#content1').css('visibility', 'hidden'); $('#content2').css(&apos ...

NodeJs Classes TypeError: Unable to access 'name' property as it is undefined

I am currently developing a useful API using Node.js. In order to organize my code effectively, I have created a UserController class where I plan to include all the necessary methods. One thing I am struggling with is how to utilize a variable that I set ...