Use of Views slowing down site - drupal-7

Not sure if I am correct or not but i found that my site nerdeky.com which is using a view to show latest nodes on front page is crashing because of the views process of loading all nodes at once.
I have a content type called "Nerdeky Info" which contains more than 500 posts. To show latest 12 posts on frontpage i created a view and applied pager for rest of the posts. It was working good untill i had 100 or 200 posts but now it is slow in loading and sometimes crashes. I have New Relic integrated with my server and i can see that whenever site crashes it reports that the view took most of the time to process php and database.
After some searching on forum i found that my view is currently loading all posts at once and showing nerdeky latest posts afterwards.
Please suggest how to make it light so that only latest posts load first.
Thanks
Bharat sharma

Related

Angular JS application taking around 100% CPU while resizing

My website is in AngularJS v1.7.2 (using Laravel PHP framework as backend).
Current issue is the website freezes after resizing several times (2-3 or more times). I have checked Google chrome Task Manager Tool and it showing around 100% of CPU usage at the time of freezes. Same issue also occurred while testing the site in mobile by changing orientation several times. I have already tried solution like bind one way, add track by for ng-repeat, using tools like Batarang but no luck yet. Is there any proper solution for the issue. Please let me know.
UPDATE
The website almost finish. Only the freeze issue currently blocking us. The website mainly containing song, album, playlist, artist.
On home page there is banner (4 images) using iosSlider . then there are per category (8 categories) album (5 album each). on right sidebar there are song list. There are other pages like category page, artist page, album page, song page, user profile pages etc. Also there is a customised player using angular soundmanager2 API. Generally while viewing in desktop normally there no issue so far. But if I check using Device Toolbar (CTRL+Shift+M) and switch to other pages and rotate 2-3 times it just freezes. Even can't reload or refresh the page tab. If I check Chrome Task manager (Shift+Esc) it shows around 100% CPU usages
that time. Thing to notice the issue only occurring if I route to other page(forward or backward or both) then rotate 2-3 times. I am using AngularJS Batarang to sort out the issue but with no clue still now
SOLVED
The issue was with iosSlider. After removing the iosSlider no crash issue now.

2sxc Blog App - Tag View

I'm using the blog app and I created a new Pipeline to give me all posts so that I could create a view that would show the archive of posts. I have it working as expected.
On my DNN page, i put another App module on the page and set the view to show the archives list and it works well on the main list view of the Blog App. When I click on a year, say 2016 to see all the posts for that year, the list view shows the correct list of posts based on the PublicationMoment attribute. The problem I'm running into is that It also changes the View on the App module that I had set to show the archives and I think it's because the Blog App as a whole is setup to change the views based on the query string parameters and both of the Blog Apps are changed to show the list of posts. Is there anyway to prevent this from happening?
I was able to figure out a solution. I created another app and set that app to pull the data from the main blog app so that the view that was displaying the Archive lost was independent of the main blog app and subsequently the view for that app didn't change with the query string parameters.

one database, same content, two wordpress sites, different structure? or another solution to have 2 websites with the same content?

I have a WordPress site that shows posts that it gets from rss using a plugin.
I want to split the "jobs" in 2 different websites because in this configuration is not working properly (high amount of rss sources to be parsed).
I need to set one site to get the posts, and the other to show them on a template; i dont want to have the rss plugin on the site that display the posts.
Is this possible using the same database, same content but different wordpress configuration?
Is there another solution to have 2 different databases and autoupdate one from another?
Any ideea other then these 2?
Thanks
if I understand your problem correctly the solution will depend on what you can do to resolve this issue.
Firstly I think you only need one website the issue you have sounds like your website is displaying items directly from the many RSS feeds which will be slow, instead I would recommend creating a process to import the posts on a daily basis to then get written to your database.
This will probably take the form of a cron job on your server.
However if you don't have access to do this I would recommend creating pages in the back end that will import the rss content when you click import.

getting feeds to update in Managing News 1.2 (Drupal 7 distribution)

I am attempting to create a half decent substitute for Google Reader but am running into a problem: when I first set up the distribution named in the title I was able to add a bunch of feeds which were displaying as hoped for (most recent posts first).
My assumption was that every time I visited the site, the RSS feeds would update and show any new content. However, the only content displayed is that which was new the day I added the feeds.
How can I address this? I notice that if I add a new feed, all the other feeds update to their newest content, if this helps put my problem in context.
Grateful for any help!
Feeds are fetched during creation and cron run in managing news distribution.
So try setting up cron jobs properly.
Also make sure the feeds that you are fetching has new contents ( by manually inspecting the feed xml).

preventing IE Silverlight caching values in a grid

I have a silverlight application that displays some values in a grid. Another part of the application updates those values and saves the updates to the source data. All of this works fine including the updating of the displayed values in the grid...until you navigate back to the page later (by say hitting refresh). Then magically all the values in the grid are back to whatever they were the first time you went to the page. I can check and verify that the data is in the source system correctly, I can also make it work fine by going into internet options and setting the browsing history to look for a new version of the page every time you visit the page. But I can't guarantee that users will do this.
I have run into this MANY times before with IE but the normal fixes don't seem to work here. I have added a timestamp to the request for the XAP file to ensure that the file is being pulled every time but somehow that is not good enough. I've also added the pragma no-cache tag to the page and still no go. It seems like Silverlight itself is it's own special case. IS there something else that can be done in the SL object to make it refresh every visit??
What code are you using to populate the grid?
If you load the data when the page is created then it will only be pulled from the database once.
If you load the data when the page is loaded or navigated to then it will be pulled from the database every time the page is displayed.
As Ken Smith says in his comment:
move your data retrieval and population code to your main form's OnNavigate event, and out of Application_Startup
This means that if you update the data and then refresh the page it should show the new values.
(I can't be 100% certain without the code)

Resources