CPU usage: AJAX and Heartbeat API on admin pages

My (shared) web host recently sent me this: “Our server monitoring systems keep indicating high server load persistently maintained by your website (…). Most of the hits are to the /www/www/wp-admin/admin-ajax.php script. We would advise the following: Do not stay logged into the WordPress dashboard through the day. Once you finish your work, you should … Read more

Virtual Memory Usage from Java under Linux, too much memory used

I have a problem with a Java application running under Linux. When I launch the application, using the default maximum heap size (64 MB), I see using the tops application that 240 MB of virtual Memory are allocated to the application. This creates some issues with some other software on the computer, which is relatively … Read more

How does the “view” method work in PyTorch?

I am confused about the method view() in the following code snippet. class Net(nn.Module): def __init__(self): super(Net, self).__init__() self.conv1 = nn.Conv2d(3, 6, 5) self.pool = nn.MaxPool2d(2,2) self.conv2 = nn.Conv2d(6, 16, 5) self.fc1 = nn.Linear(16*5*5, 120) self.fc2 = nn.Linear(120, 84) self.fc3 = nn.Linear(84, 10) def forward(self, x): x = self.pool(F.relu(self.conv1(x))) x = self.pool(F.relu(self.conv2(x))) x = x.view(-1, … Read more

WordPress plugin installation error

I have installed WordPress 3.8 and now I am trying to install WooCommerce – excelling eCommerce 2.0.20 plugin but every time I am getting this error: Note: I am trying to install plugin in local machine. Fatal error: Maximum execution time of 60 seconds exceeded in M:\XAMPP\htdocs\woocommerce\wp-includes\class-http.php on line 1327 I have tried with bellow … Read more

How do I profile memory usage in Python?

I’ve recently become interested in algorithms and have begun exploring them by writing a naive implementation and then optimizing it in various ways. I’m already familiar with the standard Python module for profiling runtime (for most things I’ve found the timeit magic function in IPython to be sufficient), but I’m also interested in memory usage … Read more

What is the most efficient way to search users by their display name?

Initially I thought I’d use get_users() but it turned out it doesn’t support the display_name field. Then I’ve read about using WP_User_Query, but when I do it always exhausts the allowed memory size of 134217728 bytes. When I remove the memory limit this part of the page doesn’t even try to load. Now I’m thinking … Read more