Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在试验一个使用 Nokogiri 从零售商网站获取产品数据的项目。有超过 500 家零售商,他们的网站结构(包括页面结构)彼此非常不同。
我最初的想法是为每个零售商(站点)创建一个类,以便可以轻松地采用任何更改。但是我不确定每个类是否都被明确地“必需”(加载/卸载)并且会导致太多的性能问题。
I think there is nothing to be concerned of. It is better to preload them in prod env once. They will certainly eat up some memory. But 500 classes is not that many so I think you'll be good.