• 카테고리
    • 전체 글

    • 카테고리1
    • 카테고리2
    • 카테고리3
    • 카테고리4
  • 태그
  • 방명록

'분류 전체보기'에 해당되는 글 1249건

  • 2008.10.22 그녀에게 전화오게 하는 방법이란 노래. 2
  • 2008.10.20 Wining Eleven 2008 4
  • 2008.10.17 자바 스크립트 클래스와 인스턴스 만들기 1
  • 2008.10.13 커스터마이징의 기본
  • 2008.10.07 믿지마라. "절대"; "원래" 라는 것은 없다.
  • 2008.10.06 VS.net 에서 참조추가 Assembly 목록에 자신의 DLL을 보이게 하기.
  • 2008.09.18 ASP.NET Performance Tips - IIS 최적화.
  • 2008.09.18 IE 7.0 동시에 많은 수의 파일 다운로드 받기. 속도 증가 효과

그녀에게 전화오게 하는 방법이란 노래.

잡글 2008. 10. 22. 10:33

요즘 보여주는 나와는 다른 세대의 전형적인 모습을 보여주는 가사이다. 멜로디는 O15B인데, 가사는 완전 요즘 스타일 요즘 20대, 10대를 위한 노래로 보인다. 전형적인 독점형 모습을 보여주고, 집착적이며 짜증나는 스타일.

처음 잘해줄때 잘하지 떠난 뒤 왠 지랄?

자기 잘못이 있으면 절대 인정하고, 다음 부터는 다른 사람과 만나게 되면 잘해주지, 괜히 후회나 하고 왜 인터넷 탓을 하는지 모르겠다. 잘해주지도 못하고 뭐하는짓인지 모르겠다. 제정신인지 체크가 필요한 가사인듯.

뭐 노래 부른 사람이나 작사한 사람은 그런 사람이라고는 생각은 안되지만,
( DMC 라는 애니 보면 더욱더 이런 생각이 강해지긴 한다.)
참 미치광이 같은 가사였다.

짜증 게이지 15% 상승;;;;

728x90
블로그 이미지

하인도1

[하인드/하인도/인도짱 의 홈페이지] 저만의 공간입니다. 다양한 소재들을 나열하는 아주 단순 무식한 홈페이지 입니다. 다양한 문서 자료도 있겠지만, 저의 푸념들도 있답니다.

Wining Eleven 2008

잡글 2008. 10. 20. 11:41

맨 처음에는 회사에서 연대리님과 권주임과 함께 시작했던 게임이였다. 사실 스포츠 게임에 대해서는 젬병에 가깝기 때문에, 그리 하고 싶지 않았지만, 그 둘이랑 하면 나름대로 재미가 있었다. 그래서 시작한 위닝.

울산 내려가기 2주전. 돌연 XBOX 360을 사게 되고 당연 타이틀을 위닝 일레븐으로 결정했다. 그리고 무척이나 열씸히 했다. 그러나 역시 저 두사람에게는 이길 수 없었다. ( 더욱이 네어라는 친구가 나랑 1:1 하면 늘 난 대파 당한다 - -;;;) 대전으로 시작한 게임이긴 하지만, 연습을 빙자한 솔로 게임을 하다보니 이것 또한 나름 재미가 있었다. 처음에느 연습게임만 하다가, 클럽하나를 선택해서 하는 단순 LEAGUE를 시작했는데, 내가 알고 있는 몇안되는 클럽 중에 하나인, AC 밀란을 택했다.

처음에는 잘 몰랐는데, 가만히 사람들의 이름을 보니, 나름대로 어디선가 주워들은 이름들이였다. 카카, 인자기, 호나우두(처음에는 Ronalodo 라고 적혀 있어 로날도 라고만 알고 있었다는...) 여기서 한참을 휩쓸고 놀았다. AC 밀란을 하면서 툭하면 카카 드리블하다가, 가끔 어시 하여 인자기 또는 호나우두가 골을 넣는... 환상의 팀.

그러나, 여전히 네어군에게는 늘 참패를 당하고 만다.
그러다 거기서 마스터 리그라는 신기한 세상을 배우고 커스텀 팀을 통해 나만의 팀을 만들어서 할 수 있다는 것도 배웠다. 여기서 처음에는 카카 없이 기본 값으로만 하다, 너무 어려워, 결국 카카와 박지성을 영입했다. 그러고 처음 시즌은 잘 보냈는데, 네고시에이션(협상) 모드에서 트레이드를 잘 못해, 변변한 스트라이크 없이 새 시즌에 들어가다 참패를 당하고 말았다.

이 교훈을 초석 삼아, 새로 팀을 꾸렸다. 욕심 탈탈 털고, 일단 카카와 30살 먹은 스트라이커를 영입했고, 그 둘을 기반으로 꾸준하게 우승을 했다. 처음에는 선수들을 키워야 되는 마음에 자꾸 써먹어야지... 라는 생각도 있었는지만, 다 접고, 걍 뛰었다. 체력 없으면 갈리고, 패스한 결과 좋은 포지션을 차지하고 있으면 망설임 없이 슛을 내질렀다.

결국 시즌 첫번째 트레이드에서 지성이를 데려왔고, 지금은 루니를 영입했다. 수비수도 대거 교체했다. 지금 대중 인기도가 E에서 출발해 A를 거쳐 S까지 올라갔다. 최소한 트레이드에서 꿀리지 않고 잘 나갈 것 같다.

아직까지 무패를 유지하고 있다. 카카의 몸값도 무쟈게 올랐다. 단, 공격수는 30살 처먹어서 걍 트레이드 시켰다. 일단 33세 이상된 선수들은 나중에 재계약을 하지 않거나 트레이드 할 예정이다. 이번 협상은 훌륭하게 끝낸것 같다. 공격수도 루니를 필두로 안정적으로 배치된 것 같고, 수비수도 수비수 제어가 가능한 친구가 둘 이나 되고, 수비 능력도 어느정도 된다.  잠깐 자동으로 켜보았는데, 한골도 안먹고 도리어 한골을 먹는 자동화된 모습도 볼 수 있었다.

이번 시즌 게임은 정말이지 기대된다.

728x90
블로그 이미지

하인도1

[하인드/하인도/인도짱 의 홈페이지] 저만의 공간입니다. 다양한 소재들을 나열하는 아주 단순 무식한 홈페이지 입니다. 다양한 문서 자료도 있겠지만, 저의 푸념들도 있답니다.

자바 스크립트 클래스와 인스턴스 만들기

기술자료/Web 2008. 10. 17. 17:47

예전 포스팅 중 [ Javascript, 객체화 하기 ] 라는 제목으로 올린 것이 있다.
그 때 쓴 포스팅 방법에 의거해서 예제 소스를 하나 구성하면 아래와 같다.

var objTest = {
      valDisplay : "",
      displayValue : function () {
            alert(this.valDisplay);
      }
     
      setValue : function(val) {
            this.valDisplay = val;
      } 
};

위의 예제를 실행해 보려면, 적절한 위치에서 아래와 같은 코드를 실행해 보면 된다.

objTest.setValue("Go Go Objected Javascript World");
objTest.displayValue();

그런데, 위와 같은 코드를 하게 되면 문제가 하나 있다. 예를 들어 objTest와 같은 로직을 부르는 곳이 많을 때다. 여기서 부르는 곳이 많다는 의미를 단순히 호출 자체의 횟수가 아니고, valDisplay를 독립적으로 운영해야 되는 경우를 말하는 것이다.
예를 들어 아래와 같은 코드를 보도록 하자.

objTest0.setValue("Go Go Objected Javascript World");
objTest0.displayValue();
objTest1.setValue("No, I Want to new display valueGo Go Objected Javascript World");
objTest1.displayValue();

위와 같은 코드를 실행하려면 아래 처럼, 처음 코드를 두개 넣어야 한다.

var objTest0 = {
      valDisplay : "",
      displayValue : function () {
            alert(this.valDisplay);
      }
     
      setValue : function(val) {
            this.valDisplay = val;
      } 
};
var objTest1 = {
      valDisplay : "",
      displayValue : function () {
            alert(this.valDisplay);
      }
     
      setValue : function(val) {
            this.valDisplay = val;
      } 
};

처음에는 단순하게 생각했었다. objTest0 = objTest; objTest1 = objTest; 이렇게 하면 되지 않을까 하고....그런데, 그렇게 쉽게 되지는 않았다. 두개의 변수는 하나의 objTest를 바라보고 있어, 결국 값은 valDisplay를 공유한 꼴이 되버린 것이다.

이에 구글링과 테스트를 반복하여 그 방법을 드디어 찾아냈다.
즉 첫번째 소스를 이렇게 변경하면 된다.

objTest = function() {
     this.valDisplay = "";
     this.displayValue = function () {
            alert(this.valDisplay);
      }     
      this.setValue = function(val) {
            this.valDisplay = val;
      } 
};

실제 실행하는 코드는 아래 처럼 짜면 된다.

var objTest0 = new objTest();
objTest0.setValue("Test0 objTest!!!!");
var objTest1 = new objTest();
objTest1.setValue("Test1 objTest!!!!");

new 라는 것을 사용해서 만들기 때문에, 새로운 인스턴스가 생성되며 별개의 메모리 상에서 동작하게 되는 것이다. 이렇게 될 수 있는 건 자바스크립트의 미묘한 마법때문이다. 예전에 이런 문제 발생한적이 있지 않은가?

var realVar = "Init Data";
reelVar = "Update value!!!";
alert(realVar);

결과는 의도한 "Update value!!!"는 안찍히고 "Init Data"가 찍힌다. 그 이유는? reelVar 라는 변수 명이 잘못된 것이다. 그러나 씹고 그냥 진행되고 도리어 reelVar라는 변수가 하나 더 생기고 그 안에 값이 들어가 버린다. 맨 아랫줄에 alert(reelVar) 찍어보면 그제서야 "Update value!!!" 가 찍힌다. 자바 스크립트에서는 새로운 형태의 변수가 발견되면 일단 변수를 멋대로 만든다.

이런 기묘한 자바스크립트의 성질을 이용해 구성하는 것이다.
코드를 하나씩 뜯어 보도록 하자.

objTest = function() {      
};
일단 함수를 만드는 것이다. 함수 객체 자체를 objTest에 담는 것이다. 즉 objTest는 변수이긴 하지만 실제로 들어 있는 것은 함수인 것이다.
     this.valDisplay = "";
여기서 부터가 진짜 마법이다. this를 처음 접하신 분들은 순간 당황하실 것이고, 객체 지향을 하시던 분이라면 저 this가 어딜 가르키는 this인지 도무지 판단이 안서실 것이다. 저 this란 바로 function() 즉 objTest를 가르키는 것이다. 즉 objTest 라는 이름의 함수 내에 valDisplay 라는 변수를 정의하는 것이다. 이처럼 정의하는 이유는 아래의 또다른 함수의 형태 때문이다. 
     this.displayValue = function () {
            alert(this.valDisplay);
      }

이번에는 displayValue 라는 형안에 또다른 함수를 때려 박는다. 이 함수는 objTest.displayValue로 호출 된다. 그런데 만일 아까 this.valDisplay = ""; 가 아닌 var valDisplay = "" 라고 쓴다면 저 함수 안에서는 밖에서 정의한 변수를 쓸 수 없다. (물론 무한한 자바스크립트 세계에서 "완전 불가"/"절대" 란 없으니 "완전 불가"/"절대" 라는 말을 뺐다.) 즉 내부에서 사용하기 위한 변수로 쓰기 위해서 this. 라는 것을 붙여서 처리한 것이다.

여튼, 지금 필자는 MOSS 2007에 WebPart라는 개념이 있는데, AJAX 스럽게 만들려다 보니, 같은 스크립트를 여러 다른 웹파트들이 쓰게 되었는데, 일단 저렇게 간신히 해결하는데 성공했다. 미묘한 감동 찌리리링 상태다.

728x90
블로그 이미지

하인도1

[하인드/하인도/인도짱 의 홈페이지] 저만의 공간입니다. 다양한 소재들을 나열하는 아주 단순 무식한 홈페이지 입니다. 다양한 문서 자료도 있겠지만, 저의 푸념들도 있답니다.

커스터마이징의 기본

기술자료/.NET 2008. 10. 13. 22:33

지금 MOSS 2007을 기반으로 다양한 인트라넷을 개발해왔다.

SK 에너지 부터 SKT 마케팅 부문, SKT 전체 인트라넷 시스템, FS 2.0 이라는 솔루션에 지금은 현대 중공업 인트라넷 시스템이다.
물론 초반에는 나도 별로 아는 것 없어 그냥 하라는대로 따라하는 경향이 좀 강했다. 모르니 할 수 없었다. 그런데, 계속 이런 저런 삽질과 헤딩을 해본 결과, 이런 결론을 얻었다.

패키지가 제공하는 기본기능은 그냥 둬라.
커스터마이징이 필요하면 복사 한뒤, 다른 이름으로 동작시켜라!

아마도 어디를 고쳐야되는지 모를 때, 해당 페이지 부분을 따라가보니, 이런 이런 마스터 파일을 기본으로 제공하는데 이걸 수정하니깐, 다 바뀌더라 .. 라는 생각으로 MOSS 2007 패키지에서 제공되는 기본 파일을 낼름 수정해 버리는 경우가 많다.
(지금 여기서는 application.master 파일을 막 수정하곤 한다.)

그런데 만일, 진짜 만일이다. MS의 WSS 또는 MOSS 2007 개발팀에서 application.master에 심각한 오류를 발견했다. 그래서 Service Pack 또는 Patch에서 이 application.master를 업데이트 했다면? 패치하고 나니 화면이 이상하게 변하거나, 안뜬다고 한다면.....
아무 생각없이 고치던 사람인 경우, 다분 이런 상황에 빠지면 즉시 서버 Rollback 들어간다. MS에서 고민고민해서 설정한 보안 문제나 버그는 딴 세상 이야기가 된다.

제발이지... 커스터마이징을 시작했다면, 기존 패키지 기본 제공 코드나 페이지, 이미지들은 그대로 두었으면 한다. 단지 그 하위에 새로운 폴더를 만들거나 다른 이름의 파일을 만들어 마음껏 커스터마이징을 하고, web.config 나 SPSite의 설정을 변경하여 그 변경된 사항이 기본이 되도록 하도록 했으면 한다.

오늘도.... 코드 작성 중 필요한 기능이 있어서 12 폴더 내용을 모두 복사하다가 반파 된 내 MOSS 2007 사이트 꼬라지에 어이가 없어 한마디 적는다.

728x90
블로그 이미지

하인도1

[하인드/하인도/인도짱 의 홈페이지] 저만의 공간입니다. 다양한 소재들을 나열하는 아주 단순 무식한 홈페이지 입니다. 다양한 문서 자료도 있겠지만, 저의 푸념들도 있답니다.

믿지마라. "절대"; "원래" 라는 것은 없다.

기술자료/.NET 2008. 10. 7. 13:23

그런데 최소한 내가 지금까지 같이 프로젝트를 뛴 프로그래머들 중 대부분은 자신의 코드를 혹은 저명한 누군가의 코드를 절대 신뢰하고, 그것을 기준 삼아 이야기를 펼친다. 그래서 분명 잘못되었음을 지적해도 절대 그렇지 않다고 한다. 때로는 원래 그렇다고 한다.이래서는 아무것도 개선할 수도 오류를 수정할 수 없게 만든다.

자신의 자식 새끼 같은 코드이고, 믿음직한 코드들일 수는 있겠지만, 최소한 컴퓨터에서 돌릴 때, 수많은 다양한 상황에 처하면 완전 배반의 모습을 여과없이 보여준다. - 프로그래머의 실수나 잘못된 로직을 스스로 고치면 이미 그건 프로그램이 아니고 생명체일 것이다. -
컴퓨터에서는 자신에게 장착된 H/W와 그 안에 구성된 프로그램대로 동작할 뿐이다. 신뢰하는 누군가가 만든 코드든, 제 잘난 맛에 사는 자기 자신이 짠 코드든, 분명 헛점이 있고, 오류가 있을 수 있다. 그래서 컴퓨터에서 오류가 발생하면 눈에 보이든 보이지 않던 의도하지 않은 오류가 분명 어딘가에 있다. 물론 내가 지적한 부분에서도 오류가 있을 수 있다. 혹은 무언가를 간과하고 짚은 부분도 있을 것이다.

그러나 그러기 앞서 같이 논의할 자세는 취해주어야 하지 않을까? 특히 다른 이의 코드를 멋대로 수정하기 앞서 자신의 코드 부분부터 확인해주는 센스도 같이 있으면 정말이지 좋겠다.

최소한 프로그래밍으로 밥벌이한다고 한다면, 조금은 완고한 자신의 생각을 접고 스스로를 의심하는 것이 좋지 않을까? 아니 같이 고민하는 열린 자세 정도는 필요하지 않을까....내 멋대로 생각해본다.

728x90
블로그 이미지

하인도1

[하인드/하인도/인도짱 의 홈페이지] 저만의 공간입니다. 다양한 소재들을 나열하는 아주 단순 무식한 홈페이지 입니다. 다양한 문서 자료도 있겠지만, 저의 푸념들도 있답니다.

VS.net 에서 참조추가 Assembly 목록에 자신의 DLL을 보이게 하기.

기술자료/OS 2008. 10. 6. 11:35

VS 2005나 VS 2008에서 참조를 추가 할 때, .NET 탭에 보면 각종 Assembly DLL 목록을 볼 수 있습니다. 여기에 보면 각종 MS 제품들에 딸린 Assembly들을 보는 대신, 우리가 만든 Assembly들은 보이지 않습니다. 물론 실제 Runtime시에는 GAC에서 직접 읽어오기 때문에, VS 2005나 VS 2008에서 보이지 않는다고 동작하지 않는 것은 아닙니다.

단지 개발하는데 있어 왠지 소외된 느낌? 왠지 개발 중 DLL 등록하는데 조금 뭔가 부족한 느낌? 그런 것 때문에 그런 것일 뿐입니다.
뭐 그래도 개발자에게 찜찜한 느낌은 개발 속도 향상에 나쁜(?) 영향을 주므로 이런 부분을 해결하는 방법을 알려드리도록 하겠습니다.

(원문 : http://support.microsoft.com/default.aspx?scid=kb;en-us;306149&Product=vsnet )

"참조 추가" 대화상자에서 어셈블리들을 표시하는 방법.

VS 2005, 2008 등에서 참조 추가 대화 상자가 떴을 때, .NET 탭을 열어보면 각종 Assembly들의 목록을 볼 수 있는데, 이 안에 직접 만든 DLL들의 목록도 뜨도록 하는 것입니다.

이 내용안에 추가하려면, 아래의 레지스트리 위치로 이동합니다.

[HKEY_CURRENT_USER\SOFTWARE\Microsoft\.NETFramework\AssemblyFolders]

그리고 새로운 키(폴더)를 만든 뒤, 그 안의 default 안에 등록할 Assembly들이 있는 경로를 넣어주십니다.

레지스트리 경로표현하면 아래와 같이 정리될 수 있습니다.

[HKEY_CURRENT_USER\SOFTWARE\Microsoft\.NETFramework\AssemblyFolders\MyAssemblies]@="C:\\MyAssemblies"

등록 후 VS 를 다시 시작하시면 됩니다.

참고 : 위의 경로에서는 HKEY_CURRENT_USER 로 되어 있는데, 위의 경로로 하면 현재 로그인된 사용자만 적용됩니다. 모든 사용자 단위로 적용하시려면 HEKY_CURRENT_USER 부분을 HEKY_LOCAL_MACHINE 으로 변경하시면 됩니다.

728x90
블로그 이미지

하인도1

[하인드/하인도/인도짱 의 홈페이지] 저만의 공간입니다. 다양한 소재들을 나열하는 아주 단순 무식한 홈페이지 입니다. 다양한 문서 자료도 있겠지만, 저의 푸념들도 있답니다.

ASP.NET Performance Tips - IIS 최적화.

기술자료/Web 2008. 9. 18. 17:46

원본글 : http://weblogs.asp.net/haroonwaheed/archive/2008/06/30/ASP.NET-Performance-Tips.aspx

최고의 자료인듯.

ASP.NET Performance Tips

At times even after applying the best coding policies & practices you don’t get the desired level of performance you are hoping from your ASP.NET application. This is because there are number other very important factors that directly affect ASP.NET applications. To get the best out of any system requires detail architectural, design, coding and deployment considerations. The post lists few of some of the many performance tweaks that you can implement to boost up ASP.NET performance.

Remove Unused HTTP Modules

There are various HTTP modules in ASP.NET that intercept each request sent to the server. Session State is a very commonly used HTTP module used to load session data in context object. It’s referred with SessionStateModule name. HTTP modules kick in at each request and process them, therefore if you are not using the functionality provided by the module there is no use referring it as they would use additional CPU cycles. There is a list of HTTP Modules that your application automatically uses when it inherits config setting from web.config placed in $WindowsFolder\Microsoft.NET\Framework\$versiosn\CONFIG folder.
Below is a list of such entries:

<httpModules>
  <add name="OutputCache" type="System.Web.Caching.OutputCacheModule"/>
  <add name="Session" type="System.Web.SessionState.SessionStateModule"/>
  <add name="WindowsAuthentication" type="System.Web.Security.WindowsAuthenticationModule"/>
  <add name="FormsAuthentication" type="System.Web.Security.FormsAuthenticationModule"/>
  <add name="PassportAuthentication" type="System.Web.Security.PassportAuthenticationModule"/>
  <add name="RoleManager" type="System.Web.Security.RoleManagerModule"/>
  <add name="UrlAuthorization" type="System.Web.Security.UrlAuthorizationModule"/>
  <add name="FileAuthorization" type="System.Web.Security.FileAuthorizationModule"/>
  <add name="AnonymousIdentification" type="System.Web.Security.AnonymousIdentificationModule"/>
  <add name="Profile" type="System.Web.Profile.ProfileModule"/>
  <add name="ErrorHandlerModule" type="System.Web.Mobile.ErrorHandlerModule, System.Web.Mobile, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
  <add name="ServiceModel" type="System.ServiceModel.Activation.HttpModule, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
</httpModules>

There are bunch of HTTP modules listed here and I am quite positive not all of them are being used by your application. Removing unused HTTP module can definitely give slight performance boost as there would be less work to be performed. Suppose one doesn’t needs Windows authentication in application. To remove the inherited setting, under httpModules section in your web.config application add a remove element and specify name of the module that isn’t required.

Example:
      <httpModules>
            <remove name="WindowsAuthentication" />
      </httpModules>

<compilation debug=”true”/> Killer
As a developer I have seen numerous incidents were the application is deployed to production with <compilation debug=”true”/>. This is really a performance killer because:
  • Compilation of ASP.NET pages take longer.
  • Code execute slower as debug paths are enabled.
  • More memory is used by the application.
  • Scripts and images from WebResource.axd handler are not cached.

Always make sure that debug flag is set to false on production instances. You can override this by specifying following entry in machine.config for production instances:

      <configuration>
            <system.web>
                    <deployment retail=”true”/>
            </system.web>
      </configuration>

This will disable the <compilation debug=”true”/> for all applications deployed on the server.

Turn off Tracing

Do remember to turn off tracing before deploying application to production. Tracing adds additional overload to your application which is not required in production environment. To disable tracing use the following entries:

      <configuration>
            <system.web>
                    <trace enabled="false" />
            </system.web>
      </configuration>

Process Model Optimization
ASP.NET allows you to define many process level properties. You can get the detail of all these properties from http://msdn.microsoft.com/en-us/library/7w2sway1.aspx.  By default these are set to auto config. This means that ASP.NET automatically configures maxWorkerThreads, maxIoThreads, minFreeThreads, minLocalRequestFreeThreads and maxConnection to achieve optimal performance. You can tailor these by specifying your own value to achieve better performance. Some of the major settings are:
  • maxWorkerThreads. The default value is 20 per process and it determines the maximum number for request that ASP.NET can process in a given second. For application that are not CPU intensive and most of time wait on database request or any external processing this can increased to get better performance.
  • maxIOThreads. The default value is 20 per process and it determines the maximum number for I/O request that ASP.NET can process in a given second. If you have enough I/O resources you can increase this value for better results.
  • memoryLimit: The default is 60%. This is the max memory ASP.NET can use until worker process is refreshed. If you have a dedicated web server with no other services running you can increase this value for better results. 
  • connectionManagement: This is a property of System.Net configuration and specifies the maximum parallel connections that can be established to a server. If your web application extensively connects to other server you can increase this value.
Enable Buffering

Make sure that buffering is enabled unless you have a specific need to turn it off. By default its enabled. ASP.Net sends response to IIS in a 31 KB buffer which then passes that to the client. When buffering is disabled ASP.NET only sends few characters to IIS thus not utilizing this buffer and increasing the trips between IIS and the worker process. To enable it you can change the web.config or enable it on each page through @page directive

      <pages buffer="true">

      <%@ Page Buffer="true"%>

Caching
Caching in ASP.NET dramatically help in boosting application performance by reducing the load on the underlying server and serving cached content that doesn’t need to be recreated on each request. ASP.NET provides two types of caching:
  • Output Cache which stores dynamic pages and user controls. One each request code is not executed if a cached version of page or control is available 
  • Data Cache which allows application to save application objects, DataSet etc in server memory so they are not recreated on each request.

Use caching whenever possible to reduce the load on your web server and to increase response time.

Caching is a huge topic can not be discussed in detail in one post. For more details visit http://msdn.microsoft.com/en-us/library/xsbfdd8c.aspx.

Kernel Cache
Use Kernel Cache if you are using IIS 6 or above. When Output cache is used in ASP.NET the request still goes to ASP.NET that itself returns the cached content. However if Kernel Cache is enabled and the request is output cached by ASP.NET, IIS receives the cached content. If a request comes for that data again IIS will serve the cached content and end the response. This can save valuable CPU cycles as it minimizes work performed by ASP.NET.

Avoid using Response.Redirect
Instead of using Response.Redirect, use Server.Transfer where ever you can. Response.Redirect sends response to the client which then sends a new request to the server. Server.Transfer however performs the redirect on the server. Only use Response.Redirect when you want authentication and authorization to be performed on redirects or you want URL on client browser to be changed because Server.Transfer will not do this as it is a server side transfer.

Avoid using Server-Side Validation
Where ever you can use client-side validation instead of Server-Side validation. This will save you from additional reposts in cases in invalid input. If you don’t trust the browsers that they will be able to perform complex validations still use client-side validation and on repost check Page.IsValid to check if the input passed the given set of rules.

Avoid DataBinder.Eval Calls
Avoid calling DataBinder.Eval multiple times for example in case of grids, repeaters etc. Instead use Continer.DataBind. DataBinder.Eval uses reflection to evaluate the arguments and therefore can decrease performance if called numerous times.

Avoid Using Page.DataBind
Never call Page.DataBind until your really need to do so. Instead if you want to bind a specific control only bind that. Calling Page.DataBind will call DataBind for all the controls that support binding.

ViewState Optimization
Avoid using ViewState for storing huge objects or disable it when you don’t need it. ViewState is also used by server controls so that they can retain their state after postback. You can also save your objects that are marked Serializable in the ViewState. ASP.NET serializes all objects and controls in the ViewState and transmits them in a hidden field to the browser. If not managed properly ViewState can increase page size and therefore increase network traffic. Also precious CPU cycles are used for Serialization and De-Serialization of ViewState objects. Disable ViewState if:
  • Your pages don’t do postback.
  • You controls are not bound to a data source or they don’t handle server events like OnClick, OnSelectedIndexChanged etc or their properties are set on each postback
  • You recreate controls on every postback.

You can disable ViewState in both web.config or @Page directive

      <pages enableViewState="false">
      or
      <%@ Page EnableViewState="false"%>

Save or Compress ViewState
In case where ViewState in mandatory and the ViewState contains enough data that can cause Network congestion or increase download response time for the user try saving or compressing the ViewState. The Page class provide two very useful methods LoadPageStateFromPersistenceMedium() and SavePageStateToPersistenceMedium(object ViewState). You can override these methods to either compress the ViewState or even prevent it from going to the client by saving it in some persistent medium on the server.

Use HTTP Compression
If your page size is large enough to cause noticeable lag between subsequent request and response you can use HTTP compression. HTTP compression is a feature of IIS and what it means is that you can compress data sent to the client using compression techniques like GZIP and Deflate. On the other side the browser decompresses the data and shows the response to the client. Most of the modern browser are capable of handling compressed data. You will certainly get a huge performance boost if your page size is large.

For more details on HTTP compression visit http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/d52ff289-94d3-4085-bc4e-24eb4f312e0e.mspx?mfr=true

Data Paging / Sorting
When ever using data grid to show data with paging enabled one thing needs to understood that if your query returned let say 5000 record and you are only showing 100 records per page the rest of the 4900 record will be discarding and the same will apply when ever you will change the page or apply sorting. The additional 4900 rows will definitely take up memory and if your database is located on a different server which is most commonly the case you will also be transferring unnecessary data over the network. Make sure you are only returning the required results to the ASP.NET application by filtering out the data in your database query and apply custom paging. SQL Server 2005 and onwards provide valuable function for ranking data that can be used to accomplish this.

Connection Pooling
Creating a connection to a database is a resource intensive process and takes time. Connection pooling allows you to reuse these connections saving time and resources. When a new connection is requested the connection pool managers first searches in the connection pool and if doesn’t finds one, it creates a new one. There are various things that need to be done to use connection pooling effectively:
  • Avoid Connection Leakage. This means that you opened a connection but didn’t close it. If you don’t close the connection the connection pool manager will never put it in the pool for later reuse until the GC is called.
  • Use the same connection string. Connection pool manager searches for similar connection in the pool by the connection string.
  • Use SQL Servers and .NET CLR Data performance counters to monitor pooling.
  • Open connections as late as possible and close them as early as possible
  • Don’t share same connection between multiple function calls. Instead open a new connection and close it in each function.
  • Close transactions prior to closing the connection.
  • Keep at least one connection open to maintain the connection pool.

Avoid Multiple Database Access
Avoid accessing database multiple times for the same request. Analyze your code and see if you can reduce the number of trips to database because these trips reduce the number of request per second your application can serve. You can do this by returning multiple records in the same stored proc, combining multiple DB operations in same stored proc etc.

Use DataReader Instead of DataSet
Use DataReader objects instead of DataSet when ever you need to display data. DataReader is the most efficient means of data retrieval as they are read and forward only. DataSet are disconnected and in-memory therefore uses valuable server resources. Only use them when you need the same data more then once or want to do some processing on the data.

Last but certainly not the least follow the best coding, design and deployment patterns and practices. Here are few more usefull links that can be very helpful in performance optimization of you ASP.NET application
  • http://msdn.microsoft.com/en-us/library/ms973838.aspx
  • http://msdn.microsoft.com/en-us/library/ms998569.aspx
  • http://msdn.microsoft.com/en-us/magazine/cc500561.aspx
  • http://msdn.microsoft.com/en-us/library/ms998549.aspx
  • http://msdn.microsoft.com/en-us/library/ms973839.aspx
728x90
블로그 이미지

하인도1

[하인드/하인도/인도짱 의 홈페이지] 저만의 공간입니다. 다양한 소재들을 나열하는 아주 단순 무식한 홈페이지 입니다. 다양한 문서 자료도 있겠지만, 저의 푸념들도 있답니다.

IE 7.0 동시에 많은 수의 파일 다운로드 받기. 속도 증가 효과

기술자료/OS 2008. 9. 18. 15:52

참조글 : http://www.vistarewired.com/2007/04/16/increase-the-number-of-simultaneous-downloads-in-internet-explorer-7

FireFox 나 구글 크롬이 나오면서 확실히 입지가 서서히 줄어드는 IE이지만,
운영체제에 껴서 같이 나오는 웹브라우저라 여전한 강세를 유지하고 있는 것도 사실이다.
게다가, 우리나라는 X 같은 ActiveX를 줄창나게 쓰는 곳인지라, IE 빼고는 대안이 없는 것이 사실이기도 하다.

그런데, IE, 특히 버전 7.0 에서 조금이나마 속도를 증가 시킬 수 있는 방법이 있다.
그것은 바로 파일 다운로드 동시 갯수를 늘리는 것이다.
물론 W3C의 표준은 동시에 2개의 연결만 가능하도록 하는 것이긴 하지만,
이미지 파일 서버, 미디어 파일 서버와 같이 갈갈이 서버가 갈라진 서버의 경우에는
동시에 파일을 받는 갯수를 늘리면 효과를 볼 수 있다.

단 이 방법은 레지스트리를 수정하는 것이므로 레지스트리 수정 방법에 대해서 잘 모르는 사람은 시도하지 않았으면 한다. ( 혹여 수정 실패로 인해 컴퓨터 맛탱 가는 것은 절대 필자의 책임이 아님을 다시 밝힌다. )

1. 시작 -> 실행을 하여 실행 창을 띄운다.
2. 실행 창에서 regedit.exe 를 입력하여 레지스트리 수정도구를 실행한다.
3. 왼편 트리 창에 있는 트리 항목을 아래의 순서대로 따라 간다.
    HKEY_CURRENT_USER -> Software -> Microsoft -> Windows
        -> CurrentVersion -> Internet Settings
4. Internet Settings 항목이 선택된 상태에서 메뉴 상의 편집(E) -> 새로 만들기 -> DWORD 값을 선택한다.
5. 오른쪽의 새 값#1의 항목에서 살짝 클릭하면 이름을 변경할 수 있는데, 이름을 MaxConnectionsPer1_0Server 로 변경한다.
6. MaxConnectionsPer1_0Server 항목을 더블 클릭한 뒤, 10진수로 500을 넣는다.
7. 다시 4번 처럼 한다.
8. 5번 처럼 이름을 변경하는데 변경될 이름은 MaxConnectionsPerServer 이다.
9. MaxConnectionsPerServer 항목에서 더블 클릭해서 10진수로 500을 넣는다.

10진수로 넣는 값은 3~500까지 가능한데, 어차피 웹서버에서 주는 대로 받기 때문에, 500까지 다 쓸일은 없지만, 귀찮아서 그냥 500으로 넣는다. (실제로 대부분의 웹사이트는 2개만 준다. )

설정이 완료되면 레지스트리 편집기를 닫고 IE를 다시 시작하면 조금이나마 빠른 느낌을 받을 수 있다. ( 물론 인터넷이 원체 느리거나 웹서버가 삐리하면 변화가 그다지 없다. )

728x90
블로그 이미지

하인도1

[하인드/하인도/인도짱 의 홈페이지] 저만의 공간입니다. 다양한 소재들을 나열하는 아주 단순 무식한 홈페이지 입니다. 다양한 문서 자료도 있겠지만, 저의 푸념들도 있답니다.

  • «
  • 1
  • ···
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • ···
  • 157
  • »
250x250

블로그 내에 소스 코드 삽입 이사온 기념 스킨도... RSS 전문 기능 비활성화 관련. 스킨 바꾸어 보았습니다. 서버 파일 정리 좀 했습니다.

«   2025/12   »
일 월 화 수 목 금 토
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31

windows SharePoint 수 Google Apps Engine Buscuit 것 지름신 twi2me WSS e-book me2sms Tutorial 2010 개발환경 인터파크 me2dayzm 친구 매뉴얼 불만 좀 협업 MOSS 2007 Visual Studio moss 오류 me2photo Azure java 비스킷 블로그

  • Total :
  • Today :
  • Yesterday :

Copyright © 2015-2025 Socialdev. All Rights Reserved.

Copyright © 2015-2025 Socialdev. All Rights Reserved.

티스토리툴바