Wednesday, May 29, 2013

Sharepoint 2013 very slow, improve performance

nothing from all that is from me and i'll post all the original links at the end.
* NOTE: most of these things are only optional if you dont use the search, and you must remember to undo everything when the time to use search has come.

* another note is that in reality you should have a fast HD, good connection, 4 CPUs, and if you heavily limit the noderunner.exe you can make it with 8GB.

* third note is that all that doent greatly improve the performance, but does help in a noteable amount, especially after doing Copy to Sharepoint Root, so its worth it but its not redemption.

1 - stop the search:
this one is a multi stage:
A - go to Central Admin -> Manage Services on Server and stop these:
        Search Host Controller Service     
        Search Query and Site Settings Service
        Distributed Cache       
B - Task Manager -> Services tab -> press the Services button and stop and disable the following:
        Sharepoint Search Host Controller
        Sharepoint Server Search 15   
     those sometimes comes back so u might be wanting to watch them.
C - go to "C:\Program Files\Microsoft Office Servers\15.0\Search\Runtime\1.0\noderunner.exe.config" and change to  <nodeRunnerSettings memoryLimitMegabytes="50" />

there are ways to just reduce the search, but here we completly disabled it.

another thing you can do is to open the Dashboard for further investigation

last this i still need to investigate is how to improve the SQL performance that seem to take affect too.
what i did that seems to help:
open the Management Studio -> right click on the server (the dad of the DB's) -> properties -> Memory tab -> i gave max query 2000MB
in the processors tab i checked the Boost SQL Server priority


More on the coding part
1. make sure you dispose all SP objects, read this and its inner refrences

IIS - Warm/Wake up SP
IIS8 -

Web Config:
<compilation batch='false'>

Slowness caused by lack of Internet Access:
1.      Slowness caused by lack of Internet Access:                                                               
Method 1
regedit: HKEY_USERS\\Software\Microsoft\Windows\CurrentVersion\WinTrust\Trust Providers\Software Publishing
Method 2
host file:
Method 3
<?xml version="1.0" encoding="utf-8"?>
              <generatePublisherEvidence enabled="false"/>
Method 4
Edit a group policy on the local server. Control Panel > Search for Policy > click Edit Group Policy > Computer Configuration >  Windows Settings > Security Settings > Public Key Policies > double click Certificate Path Validation Settings > click Tab Network Retrieval > click top check box to turn all check boxes on > set the 2 timeout values to 1. see Graphic  below.

Method 5
Install root cert
Others issues:
×          Disable/Reduce Search:

×          Distributed Cache (6 sec slowness):
Make sure Distributed Cache is working correctly with domain account user:

Tuesday, May 28, 2013

using JQuery.Deferred example

this is equals to OnAfterReady or OnReadyComplete, can also be used as OnClickComplete

var jqReady = $.Deferred();
$(document).bind("ready", jqReady.resolve);

$.when(jqReady).then(function () {


Thursday, May 23, 2013

SP.UI.ModalDialog call parent javascript expamlpe

1 - put ur script in a function, even if its a simple one, sometimes he wont know how to call it, expamlpe:
function Part3_InvoiceGrid_reloadGrid() {

2 - from the modal window u call it like this (as simple as that):

Tuesday, May 7, 2013

Entity Framework (EF) Code First: NotMapped and WCF solved

hi all!!

to all of u that ever tried to put a property in ur class, with the will that the EF wont put it in the DB yet will expose it, and tried to do the right thing using attribute "NotMapped" and it didnt work...

well MS somehow made it that if u put NotMapped then u also lose the serialization part, meaning that its not a "DataMember" anymore.

so there is a solution: add both NotMapped and DataMember.