If I understand correctly, the problem is that you or the user in question is mostly proficient in JavaScript and would like to employ it. If you just drag an drop a file into the Browser window, the DOM and subsequent rendering step will incur great overhead, in your case even leading to premature application termination due to an out of memory exception.

You can use JavaScript standalone. 
So you could use either use

- [node.js][1], [Rhino][2] or  
- the Browser's `FileReader` API and a simple REST Endpoint

You should be able to effortlessly open GB sized files in a `FileReader` object, with the caveat that the following approach is not the best performing. Then in a loop you would read blocks of say 5MB into memory, process these and push these to a webserver (ideally at localhost/127.0.0.1) You could use a simple php script for that (name it `index.php`). Something like:

    <?php file_put_contents("outfile".date().".tsv", implode('', $_POST); , FILE_APPEND); ?>

**Notes**: 

- You should probably do some filtering on the `$_POST` variable first, and put a PHP_Session ID into the filename.

- Through another short php/some-language script you could offer the user to compress said output-file and let the user download it. The script checks if the archive already exists, and if not inform the user to try again later.

- You should do the POSTing of the processed content through AJAX calls. If you do not want to use a comprehensive library such as jQuery for that purpose consider using *[is-lib's][3]* `setFile` function.

**Reference:** 

For an hands-on example of the File-Reader see this [project][4], and look up the [MDN Reference][5] for more information.

Good luck.


  [1]: http://nodejs.org/%E2%80%8E
  [2]: https://developer.mozilla.org/en/docs/Rhino
  [3]: https://github.com/lsauer/is-library/blob/master/islibrary.js
  [4]: https://github.com/lsauer/chrome-session-restore
  [5]: https://developer.mozilla.org/en-US/docs/Web/API/FileReader