Slow reload: fileEvaluate

Hi!

I’m using the antd-icons within my meteor+react project (v1.11.1, but also had the problem on previous versions), however i face a weird problem:

Whenever i use the icons, the reload of the web-app gets super slow!

import React from 'react';
import { UserOutlined } from '@ant-design/icons';


function Dashboard(props) {
    return (
        <div>
            <UserOutlined />
        </div>
    );
}

export default Dashboard;

Using this component, the reload takes about 8 seconds, while removing just the icon here makes it reload instantly. Using the chrome performance monitor i faced a strange behavior of fileEvaluate. There are thousands of block all having the same structure as displayed on the screenshot:

Is there any workaround to avoid this (apart from not using antd-icons :wink: )

This should be probably…

import UserOutlined from '@ant-design/icons/UserOutlined';

…otherwise you’re importing all icons, of which you want to use just one.

2 Likes

Thank you very much! That’s it :slight_smile: :+1: :+1:

1 Like

that fixed your problem? i have something similar

thanks a lot. may i ask any other questions if anything?

Sure thing, go ahead.