Comments (5)
InnerText是有非常强大的副作用的方法(扫描所有子元素)。
from jumony.
可以设置内部缓存, 当发生内容赋值的时候向上清除缓存
from jumony.
因为习惯了 HtmlAgilityPack,所以每次调用诸如 InnerText 时都会忘记加括号。
from jumony.
事实上在一些未来分支里面是有尝试缓存的,但是无论如何缓存的刷新仍然不可避免的会带来性能问题,尤其是频繁大量的的修改操作,如果InnerText操作相对较少,反而不缓存能带来性能优势。
from jumony.
Ivony可能有点陷入性能问题的纠结中了,
客观的来说, 对性能有特别苛刻要求的环境下, 是不会使用Jumony这样的HTML结构分析器的, 而是会直接使用文字处理或者正则, 甚至是异步的获取信息缓存后使用.
对于一个模板引擎来说, 性能也绝不是Ivony的优点和卖点,
使用Ivony的环境, 大致有两类
一类是多线程任务方式运行的爬虫系统, 这类系统本身的设计就是"让他慢慢获取数据, 获取好了我再拿来用", 所以性能不是重点, 重点是用起来方便, 免去开发人员写大量复杂正则的工作.
另外一类是生成静态HTML的需求, 这类需求本身就应该被设计成异步的. 性能也不是重点.
如果存在第三类用Jumony来实时渲染模板输出到浏览器的应用, 那要么可以说它用错了场景, 要么就是项目的并发压力很小, 完全不必担心模板引擎的性能扯后腿.
from jumony.
Related Issues (20)
- 可选结束标签强制结束没有考虑到标签里面嵌套了另一个标签的时候的情况。
- public static IEnumerable<IHtmlElement> Elements(this IHtmlContainer container, string selector) 不能识别选择器中的逗号语法 HOT 2
- JumonyParser LoadDocument doesn't work if meta description has "
- 目标文档的html 中缺少 > 会在某些情况下导致死循环
- 请求网页前能不能设置cookie? HOT 1
- CSS某些样式无法识别导致错误
- 不知是否支持.net core? HOT 1
- 这个项目为什么叫 Jumony,有什么特别的含义 HOT 1
- 说好的.net core呢?
- 不知道是否支持 HTTPS
- 能否提供个强签名的Ivony.Html.Parser.Regulars.dll HOT 1
- 新版本style不存在报错问题 HOT 2
- 期待早点支持netcore的版本 HOT 1
- 获取类似 style='diaplay: ; width: 12px'的样式存在bug HOT 1
- Style().SetValue和Style().GetValue方法存在大小写问题 HOT 1
- 在class名含有大写字母时,不能正确解析。
- 解析属性值时出现Bug
- 有没有DEMO什么的,看不出来效果啊 HOT 2
- 请问一下,能支持.net 4.5吗? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jumony.