<p>This is likely implementation specific. Bitcoind is an intensive application to run on a basic server, especially if the webapp lives on the same machine. </p>

<p>You should never directly connect a page's code with Bitcoin Core, for static information you should run a cronjob to update a cache every <code>n</code> seconds. If all you're showing is the last 10 blocks, maybe you shouldn't have every user at that moment triggering calls for the same data. </p>

<p>Update: It's worth mentioning that RPC responses suffer a delay whenever Bitcoin Core is syncing, whether syncing for the first time, or being switched on after a day. This is because the block verification functions block for a while.</p>

CC BY-SA 3.0
2016-01-13T16:46:28.743Z
The problem was that bitcoind wasn't yet synchronized but your also of course will also help me.
Jan Wytze
CC BY-SA 3.0
2016-01-14T18:20:41.783Z
Ah, I was going to mention that but thought against it :) I'll mention it in my answer, since it'll happen every time you start the node.
karimkorun
CC BY-SA 3.0
2016-01-13T00:02:13.393Z
2016-01-14T18:23:22.753Z
2016-01-14T18:23:22.753Z
karimkorun
<p>I am trying to use bitcoins on my website. For this I use EasyBitcoin-PHP. It works good except that it is very slow. It takes about 5 seconds to load a simple script like this:</p>

<pre><code>&lt;?php
require_once 'easybitcoin.php'; 
$bitcoin = new Bitcoin('...', '...');
echo $bitcoin-&gt;getinfo();
?&gt;
</code></pre>

<p>Is there a faster alternative than EasyBitcoin-PHP or is there a way to make it faster?</p>

<json-rpc><php>
EasyBitcoin-PHP very slow
Jan Wytze
# EasyBitcoin-PHP very slow

(Asked by: username_0 on 2016-01-12)

I am trying to use bitcoins on my website. For this I use EasyBitcoin-PHP. It works good except that it is very slow. It takes about 5 seconds to load a simple script like this:
getinfo();
?>

Is there a faster alternative than EasyBitcoin-PHP or is there a way to make it faster?

**Tags:** json-rpc, php


---

## 1 answers

### Answer by username_1 on 2016-01-13. Score: 3 | Accepted answer

This is likely implementation specific. Bitcoind is an intensive application to run on a basic server, especially if the webapp lives on the same machine.

You should never directly connect a page's code with Bitcoin Core, for static information you should run a cronjob to update a cache every `n` seconds. If all you're showing is the last 10 blocks, maybe you shouldn't have every user at that moment triggering calls for the same data.

Update: It's worth mentioning that RPC responses suffer a delay whenever Bitcoin Core is syncing, whether syncing for the first time, or being switched on after a day. This is because the block verification functions block for a while.

> **Comments:**
> **username_0**: The problem was that bitcoind wasn't yet synchronized but your also of course will also help me.  
> **username_1**: Ah, I was going to mention that but thought against it :) I'll mention it in my answer, since it'll happen every time you start the node.  

---

