<p>We've got a page with a ton of jQuery (approximately 2000 lines) that we want to trim down b/c it is a maintenance nightmare, and it might be easier to maintain on the server.  We've thought about using UpdatePanel for this.  However, we don't like the fact that the UpdatePanel is sending the whole page back to the server.  </p>

[{'answer_id': 22512, 'author': 'Dan Herbert', 'author_id': 392, 'author_profile': 'https://Stackoverflow.com/users/392', 'pm_score': 3, 'selected': False, 'text': "<p>I don't know if there is a way to optimize UpdatePanels, but my company has found its performance to be pretty poor. jQuery is much much faster at doing pretty much anything.</p>\n\n<p>There can be a lot of lag between the time when an UpdatePanel triggers an update and when the UpdatePanel actually updates the page.</p>\n\n<p>The only reason we use UpdatePanels is because of the ease of development. Almost nothing needs to be done to make them work.</p>\n"}, {'answer_id': 22613, 'author': 'Dave Ward', 'author_id': 60, 'author_profile': 'https://Stackoverflow.com/users/60', 'pm_score': 6, 'selected': True, 'text': '<p>Don\'t move to UpdatePanels.  After coming from jQuery, <a href="http://encosia.com/2007/07/11/why-aspnet-ajax-updatepanels-are-dangerous/" rel="noreferrer">the drop in performance</a> would be untenable.  Especially on a page as complex as yours sounds.</p>\n\n<p>If you have 2,000 lines of JavaScript code, the solution is to refactor that code.  If you put 2,000 lines of C# code in one file, it would be difficult to maintain too.  That would be difficult to manage effectively with <strong>any</strong> language or tool.</p>\n\n<p>If you\'re using 3.5 SP1, you can use the ScriptManager\'s new script combining to separate your JavaScript into multiple files with no penalty.  That way, you can logically partition your code just as you would with server side code.</p>\n'}, {'answer_id': 22677, 'author': 'Julio César', 'author_id': 2148, 'author_profile': 'https://Stackoverflow.com/users/2148', 'pm_score': 4, 'selected': False, 'text': '<p>Please don\'t put your self in that world of pain. Instead use <a href="http://msmvps.com/blogs/omar/archive/2008/05/24/uframe-goodness-of-updatepanel-and-iframe-combined.aspx" rel="nofollow noreferrer">UFRAME</a> which is a lot faster and is implemented in jQuery.</p>\n\n<p>Now, to manage those 2000 lines of Javascript code I recommend splitting the code in different files and set up your build process to join them using JSMin or Yahoo Compressor into chunks.</p>\n'}, {'answer_id': 18569627, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 2, 'selected': False, 'text': "<p>Using UpdatePanel force you to use ScriptManager that added tons of scripts in your webpages.\nUpdatePanel provides you partial postback and not real ajax.\nIf your will run only on a LAN and not internet that's ok, but if your target is internet try refractoring your codes and compress them with some tools before publish on the website</p>\n"}]
['https://Stackoverflow.com/questions/22466', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1446/']