Skip to content
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

모듈 클래스 불러올때 언어파일은 불러오지 않았으면 합니다. #10

Closed
khongchi opened this issue Nov 4, 2013 · 3 comments

Comments

@khongchi
Copy link
Contributor

khongchi commented Nov 4, 2013

https://code.google.com/p/xe-core/issues/detail?id=918

Reported by [email protected], Nov 7, 2011
class중에 ModuleHandler.class.php파일 내 getModuleInstance를 보니 View를 불러오던 Controller를 불러오건, Model을 불러오건 해당 모듈의 class를 불러오면 언어파일을 로드하는군요.. Controller나 Model같은 경우 언어파일은 필요 없는 경우가 많습니다. 예를 들어 세션 모듈의 언어파일은 관리자페이지 외에선 거의 쓸일이 없습니다.
512번째 줄 Context::loadLang($class_path.'lang'); 부분을 기본적으론 불러오지 않게 했으면 좋겠습니다. 여러 모듈을 혼합해 사용하는 모듈들이 많은데(기본으로 불러오는 모듈만 해도 애드온모듈, 세션모듈, 모듈모듈, 서비스모듈 하나. 이렇게 되지요. 이중에 애드온 모듈과 세션모듈의 언어파일은 불러오지 않아도 관리자 외엔 무방합니다.) 사용하지 않는 언어파일로 메모리 점유율이 높아지지 않겠습니까?..(물론, 그리 크지 않다.. 라고 하실 수 있지만, 티끌 모아 태산이지요;; ㅠㅋ)
가벼운 XE를 만들어 보아요;

http://xe.xpressengine.net/index.php?mid=issuetracker&act=dispIssuetrackerViewIssue&page=23&document_srl=19349595

@ghost
Copy link

ghost commented Nov 19, 2013

현재로써는 득보다 실이 더 클 것 같습니다.

현재 getLang('lang-code')에서 getLang('module-name.lang-code') 또는 getLang('module', 'lang-code') 등으로 변경해야 하는데 호환성 문제를 해결할 수 없음.

@ghost ghost closed this as completed Nov 19, 2013
@smaker
Copy link
Contributor

smaker commented Nov 19, 2013

차라리 module.xml에 언어 파일을 로드할지 여부를 정할 수 있는 게 좋지 않을까요? 기본으로 언어 파일을 로드하되, xml에 명시 놓으면 안 불러들이는 방식이 좋은 것 같네요.

@ghost
Copy link

ghost commented Nov 19, 2013

@smaker 그렇게까지 꼼꼼하게 정의하여 개발이 가능할지 모르겠습니다.
또한, module.xml에 정의된 것은 proc_, disp_, get* 등 주소로 직접 접근을 위한 것들만 정의하고 있으므로 내부(다른 모듈 등에서만 호출) 메소드가 호출될 때는 또 다른 스펙을 정의해야 할 것 같습니다.

akasima pushed a commit that referenced this issue Jun 11, 2014
akasima pushed a commit that referenced this issue Jul 2, 2014
ghost pushed a commit that referenced this issue Dec 24, 2014
ghost pushed a commit that referenced this issue Jul 3, 2015
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants