@ -92,32 +98,74 @@ Duke Rd & Walden Ave,Buffalo,NY,14225,Apple Store Walden Galleria,(716) 685-2762
@@ -92,32 +98,74 @@ Duke Rd & Walden Ave,Buffalo,NY,14225,Apple Store Walden Galleria,(716) 685-2762
<script>
$(function()
{
var rowCount = 0;
var big = 10240; // 10 MB
$('#parseText').click(function()
{
// TODO: Build in some performance logging
//var start = performance.now();
rowCount = 0;
$('#parseFiles').prop('disabled', true);
if (is('stream'))
console.log("Now parsing input (not showing progress for massive performance boost)...");
// TODO: Build in some performance logging?
var start = performance.now();
var results = $.parse($('#tb').val(), userConfig());
//var end = performance.now();
//console.log((end - start) + " milliseconds");
render(results);
var end = performance.now();
console.log(Math.round(end - start) + " ms to parse input text");
if (!is('stream'))
render(results);
else
{
console.log("Rows parsed:", rowCount);
render({"message": "Results were streamed and were not aggregated in order to save memory. See console for row count."});
}
$('#parseFiles').prop('disabled', false);
});
$('#parseFiles').click(function()
{
rowCount = 0;
$('#parseFiles').prop('disabled', true);
var start = performance.now();
$('#fileinput1, #fileinput2').parse(
{
before: function(file, inputElem)
{
console.log("BEFORE", file, inputElem);
if (file.size && file.size > big && !is('stream'))
{
if (!confirm("WARNING - " + file.name + " is a large file, but you chose not to stream the results. This could make your browser tab lock up. Continue?"))
return false;
}
if (is('stream'))
console.log("File is being parsed and the results are being streamed... (not showing progress for massive performance boost)");