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

关于networkeye是否需要数据库的讨论,请问大家觉得拦截到的请求需要存储到数据库吗? #22

Closed
coderyi opened this issue Nov 27, 2015 · 4 comments

Comments

@coderyi
Copy link
Owner

coderyi commented Nov 27, 2015

关于networkeye是否需要数据库的讨论,请问大家觉得拦截到的请求需要存储到数据库吗?
1.networkeye其实是一个小东西,是否需要一个数据库这样一个比较重的东西,
2.因为网络请求有时候插入速度比较快,比如访问UIWebView的时候,有时候就会插入很多请求,这样也会造成一些插入出错
3.插入数据库,我目前只插入JSON和XML,有些情况,比如网页的联调,或者一些文本等就不方便插入数据库了
4.如果不用数据库,不在内存的时候就看不到了;比如很多崩溃就是因为网络请求的错误,崩溃之后就看不到网络请求的信息了

@mongris
Copy link

mongris commented Nov 27, 2015

NetworkEye,a iOS network debug library

数据库是做具体应用时考虑的事情了。

@xilin
Copy link

xilin commented Nov 28, 2015

我是觉得用数据库偏重了一点。看了一下netfox的实现我觉得持久化到文件也是可以接受的。用数据库查询直接用sql虽然比较方便,但是日志这种量级的数据在内存中直接filter也不慢。

@xilin
Copy link

xilin commented Dec 26, 2015

关于第2点插入出错这一点,我觉得可以加一个串行任务队列控制一下写入

@coderyi
Copy link
Owner Author

coderyi commented Oct 10, 2016

最后 已经解决

pod 'NetworkEye', '~> 1.0.6'#不使用数据库

pod 'NetworkEye/FMDB', '~> 1.0.6' # 使用数据库

@coderyi coderyi closed this as completed Oct 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants