no instrumentar funciones pesadas

arregla problemas de perf
This commit is contained in:
Cat /dev/Nulo 2024-01-11 15:47:54 -03:00
parent 8e8fe8ddaf
commit 1348bee6c7
2 changed files with 0 additions and 2 deletions

View file

@ -2,7 +2,6 @@ use anyhow::Context;
use crate::PrecioPoint; use crate::PrecioPoint;
#[tracing::instrument(skip(dom))]
pub fn parse(url: String, dom: &tl::VDom) -> Result<PrecioPoint, anyhow::Error> { pub fn parse(url: String, dom: &tl::VDom) -> Result<PrecioPoint, anyhow::Error> {
let ean = dom let ean = dom
.query_selector("div#brandText") .query_selector("div#brandText")

View file

@ -32,7 +32,6 @@ pub fn get_json_lds<'a>(
.filter_map(|n| n.as_tag()) .filter_map(|n| n.as_tag())
.map(|t| serde_json::from_str(&t.inner_html(dom.parser()))) .map(|t| serde_json::from_str(&t.inner_html(dom.parser())))
} }
#[tracing::instrument]
pub fn find_json_ld(dom: &VDom, typ: &str) -> Option<Result<Ld, serde_json::Error>> { pub fn find_json_ld(dom: &VDom, typ: &str) -> Option<Result<Ld, serde_json::Error>> {
get_json_lds(dom) get_json_lds(dom)
.filter_map(|v| v.ok()) .filter_map(|v| v.ok())