0

Added jquery min lib to textastic via Open In menu and it froze the app

Richard King 12 years ago updated 12 years ago 4
The app is unusable now, and I can't delete or move the jquery min file.
The problem is because the app normally automatically indents the code itself. JQuery min is minified into one line. You have to wait some seconds until textastic indents the code itself ( on my ipad 2 it needs 10 seconds ). 
EDIT:
This brings me to a missed feature. Specially for this problem we need an opttion to disable the auto line break fully. At the moment it is not possible, bbut specially this files needs a disabled auto line break... :/
PS: Tested it with actual jquery min on iPad 2. Works, but needs about 15 seconds to automatically indent the jquery source code.
Actually, the problem is the following:
Textastic uses the Core Text API of iOS to draw the syntax highlighted code. The longer the text that needs to be drawn, the longer it takes. So, Textastic divides the file into lines and does the layout and drawing of each line separately as soon as it comes into view. Lines that are not visible are not drawn.
In the case of a minified JQuery file, the file is one really long line. Core Text takes a long time to layout and draw this syntax highlighted line. It even takes a long time when there is no line break involved. It would only be faster if the whole line was just one font with one color but even then it wouldn't be instantaneous.
You can see the same problem in other editors. Even the Notes app has similar problems with very long lines. TextMate on the Mac is also very slow with such a file - but it isn't as noticable because desktop processors are much more powerful. So I don't think this can be solved.
To solve the problem that Textastic isn't responding anymore:
Textastic should recognize after two tries that it couldn't open the file when it was launched last time and not open it again. Just try to launch the app until the file isn't opened anymore.
whoops  my fault, sry for the wrong information. =(