Is reading app.config expensive?

前端 未结 5 1788
青春惊慌失措
青春惊慌失措 2020-12-14 07:15

No question I am yet to be hit by any read speed bottleneck. I am asking to know; if reading app.config frequently is a bad programming choice. I have known of database oper

5条回答
  •  自闭症患者
    2020-12-14 07:29

    You're not really doing I/O here, at least not directly.

    Just assume the the Config system will cache the values, and only take action when you have a performance problem.

    It's not worth cluttering up your code with DIY caching everywhere.

提交回复
热议问题