Skip to content

Commit

Permalink
update content
Browse files Browse the repository at this point in the history
  • Loading branch information
JackyAndroid committed Jan 7, 2018
1 parent b19c1ad commit 1437c68
Show file tree
Hide file tree
Showing 75 changed files with 5,087 additions and 1,100 deletions.
2 changes: 2 additions & 0 deletions SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* [列举java的集合和继承关系-百度-美团](chinese/java/列举java的集合和继承关系-百度-美团.md)
* [泛型中extends和super的区别-美团](chinese/java/泛型中extends和super的区别.md)
* [java虚拟机的特性-百度-乐视](chinese/java/java虚拟机的特性-百度-乐视.md)
* [双亲委派模型-滴滴](chinese/java/双亲委派模型-滴滴.md)
* [哪些情况下的对象会被垃圾回收机制处理掉-美团-小米](chinese/java/哪些情况下的对象会被垃圾回收机制处理掉-美团-小米.md)
* [进程和线程的区别-猎豹-美团](chinese/java/进程和线程的区别-猎豹-美团.md)
* [==和equals和hashCode的区别-乐视](chinese/java/==和equals和hashCode的区别-乐视.md)
Expand Down Expand Up @@ -62,6 +63,7 @@
* [百度](chinese/subject/百度.md)
* [性能优化](chinese/subject/性能优化.md)
* [架构分析](chinese/subject/架构分析.md)
* [插件化](chinese/subject/插件化.md)
* [网络](chinese/subject/网络.md)
* [数据库](chinese/subject/数据库.md)
* [图片](chinese/subject/图片.md)
Expand Down
2 changes: 1 addition & 1 deletion chinese/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

想当年我面试了很多家公司,发现一线公司各家面试题相似程度很高,然后我就白天面试完,晚上回来就靠回忆把各个问题整理出来,以备下一次能回答的更好。所有面试题都是我一点点人肉回来的,希望对大家有所帮助。

面试题来自于百度、小米、乐视、美团、58、猎豹、360、新浪、搜狐内部题库
面试题来自于阿里、腾讯、百度、小米、滴滴、乐视、美团、58、猎豹、360、新浪、搜狐内部题库

熟悉本文中列出的知识点会大大增加通过前两轮技术面试的几率。

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
#### Handler,Thread和HandlerThread的差别-小米

[探索 Android 大杀器—— Handler](https://github.com/xitu/gold-miner/blob/master/TODO/android-handler-internals.md)

http://blog.csdn.net/guolin_blog/article/details/9991569

http://droidyue.com/blog/2015/11/08/make-use-of-handlerthread/
- [探索 Android 大杀器—— Handler](https://github.com/xitu/gold-miner/blob/master/TODO/android-handler-internals.md)
- [Android异步消息处理机制完全解析,带你从源码的角度彻底理解](http://blog.csdn.net/guolin_blog/article/details/9991569)
- [详解 Android 中的 HandlerThread](http://droidyue.com/blog/2015/11/08/make-use-of-handlerthread/)
- [Android应用程序消息处理机制(Looper、Handler)分析](http://blog.csdn.net/luoshengyang/article/details/6817933)

从Android中Thread(java.lang.Thread -> java.lang.Object)描述可以看出,Android的Thread没有对Java的Thread做任何封装,但是Android提供了一个继承自Thread的类HandlerThread(android.os.HandlerThread -> java.lang.Thread),这个类对Java的Thread做了很多便利Android系统的封装。

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#### intentService作用是什么,AIDL解决了什么问题-小米

[android跨进程通信(IPC):使用AIDL](http://blog.csdn.net/singwhatiwanna/article/details/17041691)

生成一个默认的且与主线程互相独立的工作者线程来执行所有传送至onStartCommand() 方法的Intetnt。

生成一个工作队列来传送Intent对象给你的onHandleIntent()方法,同一时刻只传送一个Intent对象,这样一来,你就不必担心多线程的问题。在所有的请求(Intent)都被执行完以后会自动停止服务,所以,你不需要自己去调用stopSelf()方法来停止。
Expand Down
3 changes: 3 additions & 0 deletions chinese/java/双亲委派模型-滴滴.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#### 双亲委派模型

[JVM类加载过程 & 双亲委派模型](https://segmentfault.com/a/1190000008995781)
3 changes: 2 additions & 1 deletion chinese/java/并发编程-猎豹.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@
- [Java并发编程:Thread类的使用](http://www.cnblogs.com/dolphin0520/p/3920357.html)
- [Java多线程编程总结](http://lavasoft.blog.51cto.com/62575/27069)
- [Java并发编程的总结与思考](http://www.jianshu.com/p/053943a425c3#)
- [Java并发编程实战-----synchronized](http://www.cnblogs.com/chenssy/p/4701027.html)
- [Java并发编程实战-----synchronized](http://www.cnblogs.com/chenssy/p/4701027.html)
- [深入分析ConcurrentHashMap](http://www.infoq.com/cn/articles/ConcurrentHashMap)
10 changes: 10 additions & 0 deletions chinese/subject/性能优化.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
### 性能优化

#### 工具
- [HierarchyViewer](https://www.jianshu.com/p/afbf3444db19)
- [TraceView](http://blog.csdn.net/u011240877/article/details/54347396)
- [Systrace](http://blog.csdn.net/hfreeman2008/article/details/53538155)

### Java 层面
- [Java 代码性能优化](http://developer.51cto.com/art/201511/496263.htm)
- [JAVA线程池调优](https://www.cnblogs.com/jianzh5/p/6437315.html)
- [Java多线程引发的性能问题以及调优策略](http://blog.csdn.net/luofenghan/article/details/78596950)

#### [Android性能优化典范 - 第1季](http://hukai.me/android-performance-patterns/)
1. **Render Performance** Android系统每隔16ms发出VSYNC信号,触发对UI进行渲染,如果每次渲染都成功,这样就能够达到流畅的画面所需要的60fps,为了能够实现60fps,这意味着程序的大多数操作都必须在16ms内完成。我们可以通过一些工具来定位问题,比如可以使用HierarchyViewer来查找Activity中的布局是否过于复杂,也可以使用手机设置里面的开发者选项,打开Show GPU Overdraw等选项进行观察。你还可以使用TraceView来观察CPU的执行情况,更加快捷的找到性能瓶颈。
2. **Understanding Overdraw** Overdraw(过度绘制)描述的是屏幕上的某个像素在同一帧的时间内被绘制了多次。在多层次的UI结构里面,如果不可见的UI也在做绘制的操作,这就会导致某些像素区域被绘制了多次。这就浪费大量的CPU以及GPU资源。Overdraw有时候是因为你的UI布局存在大量重叠的部分,还有的时候是因为非必须的重叠背景。例如某个Activity有一个背景,然后里面的Layout又有自己的背景,同时子View又分别有自己的背景。仅仅是通过移除非必须的背景图片,这就能够减少大量的红色Overdraw区域,增加蓝色区域的占比。这一措施能够显著提升程序性能。
Expand Down
5 changes: 5 additions & 0 deletions chinese/subject/插件化.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
### 插件化

- [插件化研究之DEXCLASSLOADER](http://www.liuguangli.win/archives/366)
- [插件化研究代ACTIVITY注册](http://www.liuguangli.win/archives/387)
- [插件化研究之资源冲突](http://www.liuguangli.win/archives/452)
60 changes: 43 additions & 17 deletions docs/chinese/android/ANR定位和修正.html
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,20 @@

</li>

<li class="chapter " data-level="1.3.9" data-path="../java/哪些情况下的对象会被垃圾回收机制处理掉-美团-小米.html">
<li class="chapter " data-level="1.3.9" data-path="../java/双亲委派模型-滴滴.html">

<a href="../java/双亲委派模型-滴滴.html">


双亲委派模型-滴滴

</a>



</li>

<li class="chapter " data-level="1.3.10" data-path="../java/哪些情况下的对象会被垃圾回收机制处理掉-美团-小米.html">

<a href="../java/哪些情况下的对象会被垃圾回收机制处理掉-美团-小米.html">

Expand All @@ -270,7 +283,7 @@

</li>

<li class="chapter " data-level="1.3.10" data-path="../java/进程和线程的区别-猎豹-美团.html">
<li class="chapter " data-level="1.3.11" data-path="../java/进程和线程的区别-猎豹-美团.html">

<a href="../java/进程和线程的区别-猎豹-美团.html">

Expand All @@ -283,7 +296,7 @@

</li>

<li class="chapter " data-level="1.3.11" data-path="../java/==和equals和hashCode的区别-乐视.html">
<li class="chapter " data-level="1.3.12" data-path="../java/==和equals和hashCode的区别-乐视.html">

<a href="../java/==和equals和hashCode的区别-乐视.html">

Expand All @@ -296,7 +309,7 @@

</li>

<li class="chapter " data-level="1.3.12" data-path="../java/HashMap的实现原理-美团.html">
<li class="chapter " data-level="1.3.13" data-path="../java/HashMap的实现原理-美团.html">

<a href="../java/HashMap的实现原理-美团.html">

Expand All @@ -309,7 +322,7 @@

</li>

<li class="chapter " data-level="1.3.13" data-path="../java/java多态-乐视.html">
<li class="chapter " data-level="1.3.14" data-path="../java/java多态-乐视.html">

<a href="../java/java多态-乐视.html">

Expand All @@ -322,7 +335,7 @@

</li>

<li class="chapter " data-level="1.3.14" data-path="../java/什么导致线程阻塞-58-美团.html">
<li class="chapter " data-level="1.3.15" data-path="../java/什么导致线程阻塞-58-美团.html">

<a href="../java/什么导致线程阻塞-58-美团.html">

Expand All @@ -335,7 +348,7 @@

</li>

<li class="chapter " data-level="1.3.15" data-path="../java/并发编程-猎豹.html">
<li class="chapter " data-level="1.3.16" data-path="../java/并发编程-猎豹.html">

<a href="../java/并发编程-猎豹.html">

Expand All @@ -348,7 +361,7 @@

</li>

<li class="chapter " data-level="1.3.16" data-path="../java/抽象类接口区别-360.html">
<li class="chapter " data-level="1.3.17" data-path="../java/抽象类接口区别-360.html">

<a href="../java/抽象类接口区别-360.html">

Expand All @@ -361,7 +374,7 @@

</li>

<li class="chapter " data-level="1.3.17" data-path="../java/容器类之间的区别-乐视-美团.html">
<li class="chapter " data-level="1.3.18" data-path="../java/容器类之间的区别-乐视-美团.html">

<a href="../java/容器类之间的区别-乐视-美团.html">

Expand All @@ -374,7 +387,7 @@

</li>

<li class="chapter " data-level="1.3.18" data-path="../java/内部类.html">
<li class="chapter " data-level="1.3.19" data-path="../java/内部类.html">

<a href="../java/内部类.html">

Expand All @@ -387,7 +400,7 @@

</li>

<li class="chapter " data-level="1.3.19" data-path="../java/hashmap和hashtable的区别-乐视-小米.html">
<li class="chapter " data-level="1.3.20" data-path="../java/hashmap和hashtable的区别-乐视-小米.html">

<a href="../java/hashmap和hashtable的区别-乐视-小米.html">

Expand All @@ -400,7 +413,7 @@

</li>

<li class="chapter " data-level="1.3.20" data-path="../java/ArrayMap对比HashMap.html">
<li class="chapter " data-level="1.3.21" data-path="../java/ArrayMap对比HashMap.html">

<a href="../java/ArrayMap对比HashMap.html">

Expand Down Expand Up @@ -919,7 +932,20 @@

</li>

<li class="chapter " data-level="1.5.6" data-path="../subject/网络.html">
<li class="chapter " data-level="1.5.6" data-path="../subject/插件化.html">

<a href="../subject/插件化.html">


插件化

</a>



</li>

<li class="chapter " data-level="1.5.7" data-path="../subject/网络.html">

<a href="../subject/网络.html">

Expand All @@ -932,7 +958,7 @@

</li>

<li class="chapter " data-level="1.5.7" data-path="../subject/数据库.html">
<li class="chapter " data-level="1.5.8" data-path="../subject/数据库.html">

<a href="../subject/数据库.html">

Expand All @@ -945,7 +971,7 @@

</li>

<li class="chapter " data-level="1.5.8" data-path="../subject/图片.html">
<li class="chapter " data-level="1.5.9" data-path="../subject/图片.html">

<a href="../subject/图片.html">

Expand All @@ -958,7 +984,7 @@

</li>

<li class="chapter " data-level="1.5.9" data-path="../subject/算法.html">
<li class="chapter " data-level="1.5.10" data-path="../subject/算法.html">

<a href="../subject/算法.html">

Expand Down Expand Up @@ -1084,7 +1110,7 @@ <h1 class="search-results-title">No results matching "<span class='search-query'
<script>
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({"page":{"title":"ANR定位和修正","level":"1.4.14","depth":2,"next":{"title":"什么情况导致oom-乐视-美团","level":"1.4.15","depth":2,"path":"chinese/android/什么情况导致oom-乐视-美团.md","ref":"chinese/android/什么情况导致oom-乐视-美团.md","articles":[]},"previous":{"title":"什么情况导致内存泄漏-美团","level":"1.4.13","depth":2,"path":"chinese/android/什么情况导致内存泄漏-美团.md","ref":"chinese/android/什么情况导致内存泄漏-美团.md","articles":[]},"dir":"ltr"},"config":{"plugins":["-search","search-plus","fontsettings","sharing","[email protected]","tbfed-pagefooter","donate","local-video","[email protected]","splitter","edit-link"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"tbfed-pagefooter":{"copyright":"Copyright &copy www.jackywang.tech 2017","modify_label":"该文件修订时间:","modify_format":"YYYY-MM-DD HH:mm:ss"},"splitter":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"donate":{"alipay":"picture/alipay.jpeg","alipayText":"支付宝打赏","button":"赏","title":"","wechat":"picture/wechat.jpeg","wechatText":"微信打赏"},"fontsettings":{"family":"sans","size":2,"theme":"sepia"},"highlight":{},"back-to-top-button":{},"local-video":{},"advanced-emoji":{"myConfigKey":"test"},"sharing":{"all":["facebook","google","twitter","weibo","instapaper"],"facebook":false,"google":true,"instapaper":false,"twitter":false,"vk":false,"weibo":true},"edit-link":{"label":"编辑此页","base":"https://github.com/JackyAndroid/AndroidInterview-Q-A/edit/master"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"search-plus":{}},"theme":"default","author":"Jacky","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"AndroidInterview","language":"zh-hans","gitbook":"*","description":"一线互联网面试题"},"file":{"path":"chinese/android/ANR定位和修正.md","mtime":"2017-03-08T06:44:37.000Z","type":"markdown"},"gitbook":{"version":"3.2.2","time":"2017-12-23T12:31:37.507Z"},"basePath":"../..","book":{"language":""}});
gitbook.page.hasChanged({"page":{"title":"ANR定位和修正","level":"1.4.14","depth":2,"next":{"title":"什么情况导致oom-乐视-美团","level":"1.4.15","depth":2,"path":"chinese/android/什么情况导致oom-乐视-美团.md","ref":"chinese/android/什么情况导致oom-乐视-美团.md","articles":[]},"previous":{"title":"什么情况导致内存泄漏-美团","level":"1.4.13","depth":2,"path":"chinese/android/什么情况导致内存泄漏-美团.md","ref":"chinese/android/什么情况导致内存泄漏-美团.md","articles":[]},"dir":"ltr"},"config":{"plugins":["-search","search-plus","fontsettings","sharing","[email protected]","tbfed-pagefooter","donate","local-video","[email protected]","splitter","edit-link"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"tbfed-pagefooter":{"copyright":"Copyright &copy www.jackywang.tech 2017","modify_label":"该文件修订时间:","modify_format":"YYYY-MM-DD HH:mm:ss"},"splitter":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"donate":{"alipay":"picture/alipay.jpeg","alipayText":"支付宝打赏","button":"赏","title":"","wechat":"picture/wechat.jpeg","wechatText":"微信打赏"},"fontsettings":{"family":"sans","size":2,"theme":"sepia"},"highlight":{},"back-to-top-button":{},"local-video":{},"advanced-emoji":{"myConfigKey":"test"},"sharing":{"all":["facebook","google","twitter","weibo","instapaper"],"facebook":false,"google":true,"instapaper":false,"twitter":false,"vk":false,"weibo":true},"edit-link":{"label":"编辑此页","base":"https://github.com/JackyAndroid/AndroidInterview-Q-A/edit/master"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"search-plus":{}},"theme":"default","author":"Jacky","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"AndroidInterview","language":"zh-hans","gitbook":"*","description":"一线互联网面试题"},"file":{"path":"chinese/android/ANR定位和修正.md","mtime":"2017-03-08T06:44:37.000Z","type":"markdown"},"gitbook":{"version":"3.2.2","time":"2018-01-07T04:18:20.675Z"},"basePath":"../..","book":{"language":""}});
});
</script>
</div>
Expand Down
Loading

0 comments on commit 1437c68

Please sign in to comment.