Block interface slow loading when accessing file object

Permalink
Hi all,

I would like to ask for your help in my problem. So I have this custom block which accesses the File Manager module. So everything's fine when I am adding an image but when I am in accessing the file through the file ID, the block's add and edit interface is loading so slow.

Here is the code that accesses files in add.php and edit.php
$image = false;
if($imageID) {
  $image = \File::getByID($imageID)
}


When I remove that, the block's UI loads fine.

Thanks, guys.

 
MrKDilkington replied on at Permalink Reply
MrKDilkington
Hi gerard0710,

How are you using the $image variable?

Which file is your code snippet used in?

Are you using a shared web host account?