-
Notifications
You must be signed in to change notification settings - Fork 0
[$300] Initial Page Load #247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Contest https://www.topcoder.com/challenges/30154851 has been created for this ticket. |
Contest https://www.topcoder.com/challenges/30154851 has been updated - it has been assigned to obog. |
@atelomycterus - Can we make speeding this up top priority please? |
@jmgasper Yes, sure |
@jmgasper There are 2 main issues. ScreensRecent discussion page with a topcoder DB dump from my local env. Controller - FIXEDPlease apply PR -#249. Thanks! Vanilla loads a recent discussion page and joins a list of users. UserModel loads users and checks Photo.
After commenting it DiscussionController for recent page executes <1 sec. Page renderingPage rendering is slow due to our custom Topcoder link. Each discussion was rendered about 3,2-3,8 sec. In DEV i think about 0,5-1 sec per a discussion. Before rendering User link we request Topcoder API (Roles, Picture, Member rating) to apply proper css styles. We don't have cache for that. Using default Vanilla function to render user link. The page was rendered 3 times faster. In Dev Recent page is rendered about 20 sec, there are about 40 user links. DEVI did screens for statistics. So we can compare after fixing custom Topcoder link. Recent page - about 40 user links: https://vanilla.topcoder-dev.com/discussion/1715/home-challenges-forum-development-forums-sandy-forum-receiver-code-documents-new-discussio#latest - 1 user link: https://vanilla.topcoder-dev.com/discussion/1633/review-time-extends#latest - about 25 user links: https://vanilla.topcoder-dev.com/discussion/1838/test-editor-3333#latest 3 user links: |
@jmgasper I'm implementing cache in Topcoder plugin. Vanilla provides a cache layer. |
@jmgasper Keep you updated. I've implemented caching Topcoder User Details in Topcoder plugin. I started testing and enabled cache locally. Vanilla is full of surprises. After enabling cache, Topcoder auth isn't working because getByUserName returns always empty. It uses cached data and user wasn't found. I've fixed it. Then the same issues with permissions and roles. Vanilla couldn't start a new session because couldn't find permissions by UserID in cache. It throws errors, without any loading data from DB. Some Vanilla methods only use data from cache, others check cache and load DB. I'm trying to fix these issues. I haven't used cache in my local env before. Sorry about that.
DEVI've checked cache parameters and I couldn't find 'Cache.Enabled' and 'Cache.Method' in DEV. PRODCould you check if getenv('CACHE_ENABLED') and getenv('CACHE_METHOD') are defined for PROD? |
@jmgasper Ready for your review. ConfigurationPlease check Example config with working memcached:
You can see cache info with debug bar. If Vanilla Cache is disabled then 'Active Cache' is false. Topcoder pluginsPhotoUrl, IsAdmin and Rating are cached only. Gdn_Cache::FEATURE_EXPIRY is 3600. It allows items to auto-expire. ResultsNote that debugbar has little effect on page rendering. No memcachedPage rendering was 85-86 sec for each request. Memcached used, no changes in Topcoder pluginVanilla caches data (categories, users, roles) in memcached. Page rendering was 85-86 sec for each request. Memcached used + changes in Topcoder pluginTopcoder data (PhoroUrl, Rating, isAdmin) is cached.
TODOThere is still room for improvement.
|
@atelomycterus - We set those config values in dev:
I'm redeploying now, thanks. |
@atelomycterus - Still seems a bit slow in dev - anything I can do to help debug what's still going on? Thanks! |
@atelomycterus - One other thing - is there a key or keys we can check in the memcache to make sure that the caching is working? Thanks! |
@jmgasper I've checked DEV. MemcachedThe Vanilla cache is enabled and works. Results in DEVI've checked page rendering (#247 (comment)): |
You can connect to memcached with telnet and use 'stats' or 'get' ('get YOUR_KEY'). |
Payment task has been updated: https://software.topcoder.com/review/actions/ViewProjectDetails?pid=30154851 |
Looks like when you go to https://discussions.topcoder.com, it takes ~9seconds for the page to load. After a couple page loads, i sorted the load time descending and see this:


The text was updated successfully, but these errors were encountered: