Titanium JIRA Archive
Appcelerator Community (AC)

[AC-1140] Hangs when json file is too big

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionCannot Reproduce
Resolution Date2015-09-29T02:48:43.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsStudio
Labelsstudio3
Reporterabdelouahab
AssigneeShak Hossain
Created2015-02-20T21:39:47.000+0000
Updated2016-03-08T07:37:30.000+0000

Description

When Opened a big json file, Titanium hangs and take lot of time to work, because it was analysing it, somthing like syntax check?! while is this needed for a json file? I took a file to another editor, removed lot of lines, reformatted it, and now titanium is alerting me about errors?!

Attachments

FileDateSize
Sans titre.jpg2015-02-20T21:39:47.000+0000241145

Comments

  1. abdelouahab 2015-02-21

    The issue was from the validator, making the validator as 0 (infinite) will make a huge time to scan the file!
  2. Papia Chowdhury 2015-09-04

    Hello, We tested your reported issue but could not reproduce it. Here is the details of our test case. Let us know if you continue to get the error. *Testing Environment:* Appcelerator Studio, build: 4.2.0.201508141038 Titanium SDK: 4.1.0 GA iOS simulator: iphone 5s(v8.1) OS X version: 10.9.5 *Steps to test:* 1. Create a classic project. 2. Place a json file in the project directory and name it test.json 3. Copy below test code and run the project *Test Case:*
       var win = Ti.UI.createWindow({
       	backgroundColor : '#fff'
       });
       var file = Ti.Filesystem.getFile('test.json');
       var preParseData = (file.read().text);
       var data = file.read();
       var json = JSON.parse(data);
       var response = JSON.parse(preParseData);
       Ti.API.info(response[0].name);
       win.open();
       
    Thanks.

JSON Source