Thor
Honorary Master
- Joined
- Jun 5, 2014
- Messages
- 44,236
I am trying to debug/investigate/determine where the "drainage" is in my code.
I have a for each loop which uses
Would that be a such a big drain on performance or might it be the actual API url?
I tested my code block with this:
and well
The result is quite slow.
Between Time: 3.7666 Seconds and Time: 5.1338 Seconds
I have a for each loop which uses
PHP:
$json = file_get_contents($url);
$json = json_decode($json);
Would that be a such a big drain on performance or might it be the actual API url?
I tested my code block with this:
PHP:
<?php
$startTime = microtime(true);
// my code
echo "Time: " . number_format(( microtime(true) - $startTime), 4) . " Seconds\n";
?>
and well
The result is quite slow.
Between Time: 3.7666 Seconds and Time: 5.1338 Seconds
