Add 8000+ geojson data into cesium takes a long time

Hi,I have a geojson file within 8000+ datas and i want to render them with different colors.
I use two ways(primitive and entity) to add the datas but find it takes a long time(entity using 9 seconds and primitive using at least 40 seconds).
My question is how to add large geojson data quickly?
Below is my codes

PS:in the primitive code, if i set asynchronous to true,the application will broken and show below error message
【DeveloperError: _workerName must be defined for asynchronous geometry.】

function entity() {
    Cesium.GeoJsonDataSource.load('data/姜山云龙现状.geojson', config).then(function(data){ = 'mydata';
        const entities = data.entities.values;
        entities.forEach(entity => {
            let color = getColor(;
            entity.polygon.fill = true;
            entity.polygon.material = Cesium.Color.fromCssColorString(color);
            entity.polygon.outline = true;
            entity.polygon.outlineColor = Cesium.Color.WHITE;

function primitive() {
        $.get('data/姜山云龙现状.geojson', function(data) 
          const features = data.features;

      function addDataToGlobe(features)
        const instances = [];
        for(let i=0; i<features.length; i++)
          let feature = features[i];
          for(let j=0; j<feature.geometry.coordinates[0][0].length; j++)
            let arr = feature.geometry.coordinates[0][0];
            let newArr = new Array();
            arr.forEach(item => {
              // item = [item[0],item[1]];
            const polygon = new Cesium.PolygonGeometry({
              polygonHierarchy : new Cesium.PolygonHierarchy(
              vertexFormat: Cesium.PerInstanceColorAppearance.VERTEX_FORMAT
            const geometry = Cesium.PolygonGeometry.createGeometry(polygon);
            instances.push(new Cesium.GeometryInstance({
              geometry : geometry,
              attributes : 
                  color : Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.fromCssColorString(getColor(,
        const primitive = new Cesium.Primitive({
          geometryInstances : instances,
          appearance :  new Cesium.PerInstanceColorAppearance({ // 为每个instance着色
            translucent : true,
            closed : false
          asynchronous : false,  // 确定基元是异步创建还是阻塞直到准备就绪

Hi there,

The default is asynchronous: true as it uses web workers to do some of the heavy lifting for rendering. Web workers allow for parallelization of work, and should help performance. However, it sounds like they are not being loaded for some reason. Can you please explain how you’ve included CesiumJS in your app? Are you using a bundler such as webpack? If so, what’s the configuration?

Hi,I just code in the Cesium HelloWorld demo,do nothing else

Did you download a zip file from our website? Or use npm?

Did you start a local server by running npm start?