Skip to content

Typescript Slow Experimental Mode #211

@jrwpatterson

Description

@jrwpatterson

Hi we are proxying you component library over the top of Material-UI and I wanted to see how a component looked in your preview.

I noticed there is a significant speed difference between Typescript and Javascript on loading your system locally.

Your material-ui-merge repo vs our version with only 5 components currently

material-ui-merge (Javascript) Our Component Library (Typescript)
Time To Load 11 seconds 140 seconds
Time to Recompile 7 seconds 82 seconds
Time to Dump 5 seconds 15 seconds

So unless I've done something really silly my dump file time for 5 components is longer than the dump time for the whole material-ui-merge

For reference on the same library, storybook has a time to load of 20 seconds

uxpin.config.js

module.exports = {
  components: {
    categories: [
      {
        name: 'Inputs',
        include: [
          'src/inputs/buttons/button.tsx',
          'src/inputs/text-field/text-field.tsx',
          'src/inputs/select/simple-select.tsx',
        ],
      },
      {
        name: 'Layouts',
        include: ['src/layout/container/container.tsx'],
      },
      {
        name: 'Navigations',
        include: ['src/navigation/nav-list/nav-list.tsx'],
      },
    ],
    webpackConfig: 'webpack.config.js',
  },
  name: 'MyCRM React Design UI',
}

webpack.config.js

const path = require('path')

module.exports = {
  output: {
    path: path.resolve(__dirname, 'build'),
    filename: 'bundle.js',
    publicPath: '/',
  },
  resolve: {
    modules: [__dirname, 'node_modules'],
    extensions: ['.tsx', '.ts', '*', '.js', '.jsx'],
  },
  devtool: 'source-map',
  module: {
    rules: [
      {
        test: /\.svg$/,
        exclude: /node_modules/,
        loader: 'svg-react-loader',
      },
      {
        loader: 'babel-loader',
        test: /\.tsx?$/,
        exclude: /node_modules/,
      },
      {
        enforce: 'pre',
        test: /\.tsx?$/,
        loader: 'source-map-loader',
      },
    ],
  },
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions